xref: /netbsd-src/crypto/external/bsd/openssh/dist/ssh.h (revision 2d3b0f52dcde5e4d743340648f4f266a1ed1f05c)
1*2d3b0f52Schristos /*	$NetBSD: ssh.h,v 1.13 2020/12/04 18:42:50 christos Exp $	*/
2*2d3b0f52Schristos /* $OpenBSD: ssh.h,v 1.90 2020/07/14 23:57:01 djm Exp $ */
3ca32bd8dSchristos 
4ca32bd8dSchristos /*
5ca32bd8dSchristos  * Author: Tatu Ylonen <ylo@cs.hut.fi>
6ca32bd8dSchristos  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7ca32bd8dSchristos  *                    All rights reserved
8ca32bd8dSchristos  *
9ca32bd8dSchristos  * As far as I am concerned, the code I have written for this software
10ca32bd8dSchristos  * can be used freely for any purpose.  Any derived versions of this
11ca32bd8dSchristos  * software must be clearly marked as such, and if the derived work is
12ca32bd8dSchristos  * incompatible with the protocol description in the RFC file, it must be
13ca32bd8dSchristos  * called by a name other than "ssh" or "Secure Shell".
14ca32bd8dSchristos  */
15ca32bd8dSchristos 
16ca32bd8dSchristos /* Cipher used for encrypting authentication files. */
17ca32bd8dSchristos #define SSH_AUTHFILE_CIPHER	SSH_CIPHER_3DES
18ca32bd8dSchristos 
19ca32bd8dSchristos /* Default port number. */
20ca32bd8dSchristos #define SSH_DEFAULT_PORT	22
21ca32bd8dSchristos 
22ca32bd8dSchristos /*
2379976551Schristos  * Maximum number of certificate files that can be specified
2479976551Schristos  * in configuration files or on the command line.
2579976551Schristos  */
2679976551Schristos #define SSH_MAX_CERTIFICATE_FILES	100
2779976551Schristos 
2879976551Schristos /*
29ca32bd8dSchristos  * Maximum number of RSA authentication identity files that can be specified
30ca32bd8dSchristos  * in configuration files or on the command line.
31ca32bd8dSchristos  */
32ca32bd8dSchristos #define SSH_MAX_IDENTITY_FILES		100
33ca32bd8dSchristos 
34ca32bd8dSchristos /*
35ca32bd8dSchristos  * Major protocol version.  Different version indicates major incompatibility
36ca32bd8dSchristos  * that prevents communication.
37ca32bd8dSchristos  *
38ca32bd8dSchristos  * Minor protocol version.  Different version indicates minor incompatibility
39ca32bd8dSchristos  * that does not prevent interoperation.
40ca32bd8dSchristos  */
41ca32bd8dSchristos #define PROTOCOL_MAJOR_1	1
42ca32bd8dSchristos #define PROTOCOL_MINOR_1	5
43ca32bd8dSchristos 
447a183406Schristos /* We support only SSH2 */
45ca32bd8dSchristos #define PROTOCOL_MAJOR_2	2
46ca32bd8dSchristos #define PROTOCOL_MINOR_2	0
47ca32bd8dSchristos 
48ca32bd8dSchristos /*
49ca32bd8dSchristos  * Name for the service.  The port named by this service overrides the
50ca32bd8dSchristos  * default port if present.
51ca32bd8dSchristos  */
52ca32bd8dSchristos #define SSH_SERVICE_NAME	"ssh"
53ca32bd8dSchristos 
54ca32bd8dSchristos /*
55ca32bd8dSchristos  * Name of the environment variable containing the process ID of the
56ca32bd8dSchristos  * authentication agent.
57ca32bd8dSchristos  */
58ca32bd8dSchristos #define SSH_AGENTPID_ENV_NAME	"SSH_AGENT_PID"
59ca32bd8dSchristos 
60ca32bd8dSchristos /*
61ca32bd8dSchristos  * Name of the environment variable containing the pathname of the
62ca32bd8dSchristos  * authentication socket.
63ca32bd8dSchristos  */
64ca32bd8dSchristos #define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
65ca32bd8dSchristos 
66ca32bd8dSchristos /*
67ca32bd8dSchristos  * Environment variable for overwriting the default location of askpass
68ca32bd8dSchristos  */
69ca32bd8dSchristos #define SSH_ASKPASS_ENV		"SSH_ASKPASS"
70ca32bd8dSchristos 
71ca32bd8dSchristos /*
72*2d3b0f52Schristos  * Environment variable to control whether or not askpass is used.
73*2d3b0f52Schristos  */
74*2d3b0f52Schristos #define SSH_ASKPASS_REQUIRE_ENV		"SSH_ASKPASS_REQUIRE"
75*2d3b0f52Schristos 
76*2d3b0f52Schristos /*
77ca32bd8dSchristos  * Force host key length and server key length to differ by at least this
78ca32bd8dSchristos  * many bits.  This is to make double encryption with rsaref work.
79ca32bd8dSchristos  */
80ca32bd8dSchristos #define SSH_KEY_BITS_RESERVED		128
81ca32bd8dSchristos 
82ca32bd8dSchristos /*
83ca32bd8dSchristos  * Length of the session key in bytes.  (Specified as 256 bits in the
84ca32bd8dSchristos  * protocol.)
85ca32bd8dSchristos  */
86ca32bd8dSchristos #define SSH_SESSION_KEY_LENGTH		32
87ca32bd8dSchristos 
88ca32bd8dSchristos /* Used to identify ``EscapeChar none'' */
89ca32bd8dSchristos #define SSH_ESCAPECHAR_NONE		-2
90ca32bd8dSchristos 
91313c6c94Schristos /* Name of Kerberos service for SSH to use. */
92313c6c94Schristos #define KRB4_SERVICE_NAME		"rcmd"
93313c6c94Schristos 
94ca32bd8dSchristos /*
95ca32bd8dSchristos  * unprivileged user when UsePrivilegeSeparation=yes;
96ca32bd8dSchristos  * sshd will change its privileges to this user and its
97ca32bd8dSchristos  * primary group.
98ca32bd8dSchristos  */
99ca32bd8dSchristos #define SSH_PRIVSEP_USER		"sshd"
100ca32bd8dSchristos 
101ca32bd8dSchristos /* Listen backlog for sshd, ssh-agent and forwarding sockets */
102ca32bd8dSchristos #define SSH_LISTEN_BACKLOG		128
103aa36fcacSchristos 
104aa36fcacSchristos /* Limits for banner exchange */
105aa36fcacSchristos #define SSH_MAX_BANNER_LEN		8192
106aa36fcacSchristos #define SSH_MAX_PRE_BANNER_LINES	1024
107