xref: /titanic_41/usr/src/cmd/ssh/include/ssh.h (revision 1c42de6d020629af774dd9e9fc81be3f3ed9398e)
1 /*	$OpenBSD: ssh.h,v 1.71 2002/06/22 02:00:29 stevesk Exp $	*/
2 
3 #ifndef	_SSH_H
4 #define	_SSH_H
5 
6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 
13 /*
14  * Author: Tatu Ylonen <ylo@cs.hut.fi>
15  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
16  *                    All rights reserved
17  *
18  * As far as I am concerned, the code I have written for this software
19  * can be used freely for any purpose.  Any derived versions of this
20  * software must be clearly marked as such, and if the derived work is
21  * incompatible with the protocol description in the RFC file, it must be
22  * called by a name other than "ssh" or "Secure Shell".
23  */
24 
25 #include <netinet/in.h> /* For struct sockaddr_in */
26 #include <pwd.h> /* For struct pw */
27 #include <stdarg.h> /* For va_list */
28 #include <syslog.h> /* For LOG_AUTH and friends */
29 #include <sys/socket.h> /* For struct sockaddr_storage */
30 #include "fake-socket.h" /* For struct sockaddr_storage */
31 #ifdef HAVE_SYS_SELECT_H
32 # include <sys/select.h>
33 #endif
34 
35 /* Cipher used for encrypting authentication files. */
36 #define SSH_AUTHFILE_CIPHER	SSH_CIPHER_3DES
37 
38 /* Default port number. */
39 #define SSH_DEFAULT_PORT	22
40 
41 /* Maximum number of TCP/IP ports forwarded per direction. */
42 #define SSH_MAX_FORWARDS_PER_DIRECTION	100
43 
44 /*
45  * Maximum number of RSA authentication identity files that can be specified
46  * in configuration files or on the command line.
47  */
48 #define SSH_MAX_IDENTITY_FILES		100
49 
50 /*
51  * Major protocol version.  Different version indicates major incompatibility
52  * that prevents communication.
53  *
54  * Minor protocol version.  Different version indicates minor incompatibility
55  * that does not prevent interoperation.
56  */
57 #define PROTOCOL_MAJOR_1	1
58 #define PROTOCOL_MINOR_1	5
59 
60 /* We support both SSH1 and SSH2 */
61 #define PROTOCOL_MAJOR_2	2
62 #define PROTOCOL_MINOR_2	0
63 
64 /*
65  * Name for the service.  The port named by this service overrides the
66  * default port if present.
67  */
68 #define SSH_SERVICE_NAME	"ssh"
69 
70 /*
71  * Name of the environment variable containing the process ID of the
72  * authentication agent.
73  */
74 #define SSH_AGENTPID_ENV_NAME	"SSH_AGENT_PID"
75 
76 /*
77  * Name of the environment variable containing the pathname of the
78  * authentication socket.
79  */
80 #define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
81 
82 /*
83  * Environment variable for overwriting the default location of askpass
84  */
85 #define SSH_ASKPASS_ENV		"SSH_ASKPASS"
86 
87 /*
88  * Force host key length and server key length to differ by at least this
89  * many bits.  This is to make double encryption with rsaref work.
90  */
91 #define SSH_KEY_BITS_RESERVED		128
92 
93 /*
94  * Length of the session key in bytes.  (Specified as 256 bits in the
95  * protocol.)
96  */
97 #define SSH_SESSION_KEY_LENGTH		32
98 
99 /* Name of Kerberos service for SSH to use. */
100 #define KRB4_SERVICE_NAME		"rcmd"
101 
102 /* Used to identify ``EscapeChar none'' */
103 #define SSH_ESCAPECHAR_NONE		-2
104 
105 /*
106  * unprivileged user when UsePrivilegeSeparation=yes;
107  * sshd will change its privileges to this user and its
108  * primary group.
109  */
110 #ifndef SSH_PRIVSEP_USER
111 #define SSH_PRIVSEP_USER		"sshd"
112 #endif
113 
114 /* Minimum modulus size (n) for RSA keys. */
115 #define SSH_RSA_MINIMUM_MODULUS_SIZE	768
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* _SSH_H */
122