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