10Sstevel@tonic-gate /* $OpenBSD: ssh.h,v 1.71 2002/06/22 02:00:29 stevesk Exp $ */ 20Sstevel@tonic-gate 30Sstevel@tonic-gate #ifndef _SSH_H 40Sstevel@tonic-gate #define _SSH_H 50Sstevel@tonic-gate 60Sstevel@tonic-gate #ifdef __cplusplus 70Sstevel@tonic-gate extern "C" { 80Sstevel@tonic-gate #endif 90Sstevel@tonic-gate 100Sstevel@tonic-gate 110Sstevel@tonic-gate /* 120Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 130Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 140Sstevel@tonic-gate * All rights reserved 150Sstevel@tonic-gate * 160Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 170Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 180Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 190Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 200Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 210Sstevel@tonic-gate */ 224958Sjp161948 /* 23*10296SHuie-Ying.Lee@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 244958Sjp161948 * Use is subject to license terms. 254958Sjp161948 */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #include <netinet/in.h> /* For struct sockaddr_in */ 280Sstevel@tonic-gate #include <pwd.h> /* For struct pw */ 290Sstevel@tonic-gate #include <stdarg.h> /* For va_list */ 300Sstevel@tonic-gate #include <syslog.h> /* For LOG_AUTH and friends */ 310Sstevel@tonic-gate #include <sys/socket.h> /* For struct sockaddr_storage */ 320Sstevel@tonic-gate #include "fake-socket.h" /* For struct sockaddr_storage */ 330Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H 340Sstevel@tonic-gate # include <sys/select.h> 350Sstevel@tonic-gate #endif 360Sstevel@tonic-gate 370Sstevel@tonic-gate /* Cipher used for encrypting authentication files. */ 380Sstevel@tonic-gate #define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES 390Sstevel@tonic-gate 400Sstevel@tonic-gate /* Default port number. */ 410Sstevel@tonic-gate #define SSH_DEFAULT_PORT 22 420Sstevel@tonic-gate 430Sstevel@tonic-gate /* Maximum number of TCP/IP ports forwarded per direction. */ 440Sstevel@tonic-gate #define SSH_MAX_FORWARDS_PER_DIRECTION 100 450Sstevel@tonic-gate 460Sstevel@tonic-gate /* 470Sstevel@tonic-gate * Maximum number of RSA authentication identity files that can be specified 480Sstevel@tonic-gate * in configuration files or on the command line. 490Sstevel@tonic-gate */ 500Sstevel@tonic-gate #define SSH_MAX_IDENTITY_FILES 100 510Sstevel@tonic-gate 520Sstevel@tonic-gate /* 530Sstevel@tonic-gate * Major protocol version. Different version indicates major incompatibility 540Sstevel@tonic-gate * that prevents communication. 550Sstevel@tonic-gate * 560Sstevel@tonic-gate * Minor protocol version. Different version indicates minor incompatibility 570Sstevel@tonic-gate * that does not prevent interoperation. 580Sstevel@tonic-gate */ 590Sstevel@tonic-gate #define PROTOCOL_MAJOR_1 1 600Sstevel@tonic-gate #define PROTOCOL_MINOR_1 5 610Sstevel@tonic-gate 620Sstevel@tonic-gate /* We support both SSH1 and SSH2 */ 630Sstevel@tonic-gate #define PROTOCOL_MAJOR_2 2 640Sstevel@tonic-gate #define PROTOCOL_MINOR_2 0 650Sstevel@tonic-gate 660Sstevel@tonic-gate /* 670Sstevel@tonic-gate * Name for the service. The port named by this service overrides the 680Sstevel@tonic-gate * default port if present. 690Sstevel@tonic-gate */ 700Sstevel@tonic-gate #define SSH_SERVICE_NAME "ssh" 710Sstevel@tonic-gate 720Sstevel@tonic-gate /* 730Sstevel@tonic-gate * Name of the environment variable containing the process ID of the 740Sstevel@tonic-gate * authentication agent. 750Sstevel@tonic-gate */ 760Sstevel@tonic-gate #define SSH_AGENTPID_ENV_NAME "SSH_AGENT_PID" 770Sstevel@tonic-gate 780Sstevel@tonic-gate /* 790Sstevel@tonic-gate * Name of the environment variable containing the pathname of the 800Sstevel@tonic-gate * authentication socket. 810Sstevel@tonic-gate */ 820Sstevel@tonic-gate #define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK" 830Sstevel@tonic-gate 840Sstevel@tonic-gate /* 850Sstevel@tonic-gate * Environment variable for overwriting the default location of askpass 860Sstevel@tonic-gate */ 870Sstevel@tonic-gate #define SSH_ASKPASS_ENV "SSH_ASKPASS" 880Sstevel@tonic-gate 890Sstevel@tonic-gate /* 900Sstevel@tonic-gate * Force host key length and server key length to differ by at least this 910Sstevel@tonic-gate * many bits. This is to make double encryption with rsaref work. 920Sstevel@tonic-gate */ 930Sstevel@tonic-gate #define SSH_KEY_BITS_RESERVED 128 940Sstevel@tonic-gate 950Sstevel@tonic-gate /* 960Sstevel@tonic-gate * Length of the session key in bytes. (Specified as 256 bits in the 970Sstevel@tonic-gate * protocol.) 980Sstevel@tonic-gate */ 990Sstevel@tonic-gate #define SSH_SESSION_KEY_LENGTH 32 1000Sstevel@tonic-gate 1010Sstevel@tonic-gate /* Name of Kerberos service for SSH to use. */ 1020Sstevel@tonic-gate #define KRB4_SERVICE_NAME "rcmd" 1030Sstevel@tonic-gate 1040Sstevel@tonic-gate /* Used to identify ``EscapeChar none'' */ 1050Sstevel@tonic-gate #define SSH_ESCAPECHAR_NONE -2 1060Sstevel@tonic-gate 1070Sstevel@tonic-gate /* 1080Sstevel@tonic-gate * unprivileged user when UsePrivilegeSeparation=yes; 1090Sstevel@tonic-gate * sshd will change its privileges to this user and its 1100Sstevel@tonic-gate * primary group. 1110Sstevel@tonic-gate */ 1120Sstevel@tonic-gate #ifndef SSH_PRIVSEP_USER 1130Sstevel@tonic-gate #define SSH_PRIVSEP_USER "sshd" 1140Sstevel@tonic-gate #endif 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate /* Minimum modulus size (n) for RSA keys. */ 1170Sstevel@tonic-gate #define SSH_RSA_MINIMUM_MODULUS_SIZE 768 1180Sstevel@tonic-gate 119*10296SHuie-Ying.Lee@Sun.COM /* Listen backlog for sshd, ssh-agent and forwarding sockets */ 120*10296SHuie-Ying.Lee@Sun.COM #define SSH_LISTEN_BACKLOG 128 121*10296SHuie-Ying.Lee@Sun.COM 1224958Sjp161948 /* 1234958Sjp161948 * Do not display banner when in remote command mode only. Note that RFC 4254 1244958Sjp161948 * uses "exec" as a mode name for the channel opened for the execution of the 1254958Sjp161948 * given command. 1264958Sjp161948 */ 1274958Sjp161948 #define SSH_NO_BANNER_IN_EXEC_MODE 2 1284958Sjp161948 1290Sstevel@tonic-gate #ifdef __cplusplus 1300Sstevel@tonic-gate } 1310Sstevel@tonic-gate #endif 1320Sstevel@tonic-gate 1330Sstevel@tonic-gate #endif /* _SSH_H */ 134