xref: /titanic_50/usr/src/cmd/ssh/include/ssh.h (revision 29e83d4b25fd82feb8e0e0fbe89f7e2a8438533d)
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  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
26  * Use is subject to license terms.
27  */
28 
29 #include <netinet/in.h> /* For struct sockaddr_in */
30 #include <pwd.h> /* For struct pw */
31 #include <stdarg.h> /* For va_list */
32 #include <syslog.h> /* For LOG_AUTH and friends */
33 #include <sys/socket.h> /* For struct sockaddr_storage */
34 #include "fake-socket.h" /* For struct sockaddr_storage */
35 #ifdef HAVE_SYS_SELECT_H
36 # include <sys/select.h>
37 #endif
38 
39 /* Cipher used for encrypting authentication files. */
40 #define SSH_AUTHFILE_CIPHER	SSH_CIPHER_3DES
41 
42 /* Default port number. */
43 #define SSH_DEFAULT_PORT	22
44 
45 /* Maximum number of TCP/IP ports forwarded per direction. */
46 #define SSH_MAX_FORWARDS_PER_DIRECTION	100
47 
48 /*
49  * Maximum number of RSA authentication identity files that can be specified
50  * in configuration files or on the command line.
51  */
52 #define SSH_MAX_IDENTITY_FILES		100
53 
54 /*
55  * Major protocol version.  Different version indicates major incompatibility
56  * that prevents communication.
57  *
58  * Minor protocol version.  Different version indicates minor incompatibility
59  * that does not prevent interoperation.
60  */
61 #define PROTOCOL_MAJOR_1	1
62 #define PROTOCOL_MINOR_1	5
63 
64 /* We support both SSH1 and SSH2 */
65 #define PROTOCOL_MAJOR_2	2
66 #define PROTOCOL_MINOR_2	0
67 
68 /*
69  * Name for the service.  The port named by this service overrides the
70  * default port if present.
71  */
72 #define SSH_SERVICE_NAME	"ssh"
73 
74 /*
75  * Name of the environment variable containing the process ID of the
76  * authentication agent.
77  */
78 #define SSH_AGENTPID_ENV_NAME	"SSH_AGENT_PID"
79 
80 /*
81  * Name of the environment variable containing the pathname of the
82  * authentication socket.
83  */
84 #define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
85 
86 /*
87  * Environment variable for overwriting the default location of askpass
88  */
89 #define SSH_ASKPASS_ENV		"SSH_ASKPASS"
90 
91 /*
92  * Force host key length and server key length to differ by at least this
93  * many bits.  This is to make double encryption with rsaref work.
94  */
95 #define SSH_KEY_BITS_RESERVED		128
96 
97 /*
98  * Length of the session key in bytes.  (Specified as 256 bits in the
99  * protocol.)
100  */
101 #define SSH_SESSION_KEY_LENGTH		32
102 
103 /* Name of Kerberos service for SSH to use. */
104 #define KRB4_SERVICE_NAME		"rcmd"
105 
106 /* Used to identify ``EscapeChar none'' */
107 #define SSH_ESCAPECHAR_NONE		-2
108 
109 /*
110  * unprivileged user when UsePrivilegeSeparation=yes;
111  * sshd will change its privileges to this user and its
112  * primary group.
113  */
114 #ifndef SSH_PRIVSEP_USER
115 #define SSH_PRIVSEP_USER		"sshd"
116 #endif
117 
118 /* Minimum modulus size (n) for RSA keys. */
119 #define SSH_RSA_MINIMUM_MODULUS_SIZE	768
120 
121 /*
122  * Do not display banner when in remote command mode only. Note that RFC 4254
123  * uses "exec" as a mode name for the channel opened for the execution of the
124  * given command.
125  */
126 #define	SSH_NO_BANNER_IN_EXEC_MODE	2
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif /* _SSH_H */
133