xref: /titanic_50/usr/src/cmd/ssh/include/ssh.h (revision e5e9deda1d23b18f1cb530f8945e11e334149fae)
17c478bd9Sstevel@tonic-gate /*	$OpenBSD: ssh.h,v 1.71 2002/06/22 02:00:29 stevesk Exp $	*/
27c478bd9Sstevel@tonic-gate 
37c478bd9Sstevel@tonic-gate #ifndef	_SSH_H
47c478bd9Sstevel@tonic-gate #define	_SSH_H
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
77c478bd9Sstevel@tonic-gate 
87c478bd9Sstevel@tonic-gate #ifdef __cplusplus
97c478bd9Sstevel@tonic-gate extern "C" {
107c478bd9Sstevel@tonic-gate #endif
117c478bd9Sstevel@tonic-gate 
127c478bd9Sstevel@tonic-gate 
137c478bd9Sstevel@tonic-gate /*
147c478bd9Sstevel@tonic-gate  * Author: Tatu Ylonen <ylo@cs.hut.fi>
157c478bd9Sstevel@tonic-gate  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
167c478bd9Sstevel@tonic-gate  *                    All rights reserved
177c478bd9Sstevel@tonic-gate  *
187c478bd9Sstevel@tonic-gate  * As far as I am concerned, the code I have written for this software
197c478bd9Sstevel@tonic-gate  * can be used freely for any purpose.  Any derived versions of this
207c478bd9Sstevel@tonic-gate  * software must be clearly marked as such, and if the derived work is
217c478bd9Sstevel@tonic-gate  * incompatible with the protocol description in the RFC file, it must be
227c478bd9Sstevel@tonic-gate  * called by a name other than "ssh" or "Secure Shell".
237c478bd9Sstevel@tonic-gate  */
24*e5e9dedaSjp161948 /*
25*e5e9dedaSjp161948  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
26*e5e9dedaSjp161948  * Use is subject to license terms.
27*e5e9dedaSjp161948  */
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #include <netinet/in.h> /* For struct sockaddr_in */
307c478bd9Sstevel@tonic-gate #include <pwd.h> /* For struct pw */
317c478bd9Sstevel@tonic-gate #include <stdarg.h> /* For va_list */
327c478bd9Sstevel@tonic-gate #include <syslog.h> /* For LOG_AUTH and friends */
337c478bd9Sstevel@tonic-gate #include <sys/socket.h> /* For struct sockaddr_storage */
347c478bd9Sstevel@tonic-gate #include "fake-socket.h" /* For struct sockaddr_storage */
357c478bd9Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H
367c478bd9Sstevel@tonic-gate # include <sys/select.h>
377c478bd9Sstevel@tonic-gate #endif
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate /* Cipher used for encrypting authentication files. */
407c478bd9Sstevel@tonic-gate #define SSH_AUTHFILE_CIPHER	SSH_CIPHER_3DES
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /* Default port number. */
437c478bd9Sstevel@tonic-gate #define SSH_DEFAULT_PORT	22
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate /* Maximum number of TCP/IP ports forwarded per direction. */
467c478bd9Sstevel@tonic-gate #define SSH_MAX_FORWARDS_PER_DIRECTION	100
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate /*
497c478bd9Sstevel@tonic-gate  * Maximum number of RSA authentication identity files that can be specified
507c478bd9Sstevel@tonic-gate  * in configuration files or on the command line.
517c478bd9Sstevel@tonic-gate  */
527c478bd9Sstevel@tonic-gate #define SSH_MAX_IDENTITY_FILES		100
537c478bd9Sstevel@tonic-gate 
547c478bd9Sstevel@tonic-gate /*
557c478bd9Sstevel@tonic-gate  * Major protocol version.  Different version indicates major incompatibility
567c478bd9Sstevel@tonic-gate  * that prevents communication.
577c478bd9Sstevel@tonic-gate  *
587c478bd9Sstevel@tonic-gate  * Minor protocol version.  Different version indicates minor incompatibility
597c478bd9Sstevel@tonic-gate  * that does not prevent interoperation.
607c478bd9Sstevel@tonic-gate  */
617c478bd9Sstevel@tonic-gate #define PROTOCOL_MAJOR_1	1
627c478bd9Sstevel@tonic-gate #define PROTOCOL_MINOR_1	5
637c478bd9Sstevel@tonic-gate 
647c478bd9Sstevel@tonic-gate /* We support both SSH1 and SSH2 */
657c478bd9Sstevel@tonic-gate #define PROTOCOL_MAJOR_2	2
667c478bd9Sstevel@tonic-gate #define PROTOCOL_MINOR_2	0
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate /*
697c478bd9Sstevel@tonic-gate  * Name for the service.  The port named by this service overrides the
707c478bd9Sstevel@tonic-gate  * default port if present.
717c478bd9Sstevel@tonic-gate  */
727c478bd9Sstevel@tonic-gate #define SSH_SERVICE_NAME	"ssh"
737c478bd9Sstevel@tonic-gate 
747c478bd9Sstevel@tonic-gate /*
757c478bd9Sstevel@tonic-gate  * Name of the environment variable containing the process ID of the
767c478bd9Sstevel@tonic-gate  * authentication agent.
777c478bd9Sstevel@tonic-gate  */
787c478bd9Sstevel@tonic-gate #define SSH_AGENTPID_ENV_NAME	"SSH_AGENT_PID"
797c478bd9Sstevel@tonic-gate 
807c478bd9Sstevel@tonic-gate /*
817c478bd9Sstevel@tonic-gate  * Name of the environment variable containing the pathname of the
827c478bd9Sstevel@tonic-gate  * authentication socket.
837c478bd9Sstevel@tonic-gate  */
847c478bd9Sstevel@tonic-gate #define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
857c478bd9Sstevel@tonic-gate 
867c478bd9Sstevel@tonic-gate /*
877c478bd9Sstevel@tonic-gate  * Environment variable for overwriting the default location of askpass
887c478bd9Sstevel@tonic-gate  */
897c478bd9Sstevel@tonic-gate #define SSH_ASKPASS_ENV		"SSH_ASKPASS"
907c478bd9Sstevel@tonic-gate 
917c478bd9Sstevel@tonic-gate /*
927c478bd9Sstevel@tonic-gate  * Force host key length and server key length to differ by at least this
937c478bd9Sstevel@tonic-gate  * many bits.  This is to make double encryption with rsaref work.
947c478bd9Sstevel@tonic-gate  */
957c478bd9Sstevel@tonic-gate #define SSH_KEY_BITS_RESERVED		128
967c478bd9Sstevel@tonic-gate 
977c478bd9Sstevel@tonic-gate /*
987c478bd9Sstevel@tonic-gate  * Length of the session key in bytes.  (Specified as 256 bits in the
997c478bd9Sstevel@tonic-gate  * protocol.)
1007c478bd9Sstevel@tonic-gate  */
1017c478bd9Sstevel@tonic-gate #define SSH_SESSION_KEY_LENGTH		32
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate /* Name of Kerberos service for SSH to use. */
1047c478bd9Sstevel@tonic-gate #define KRB4_SERVICE_NAME		"rcmd"
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate /* Used to identify ``EscapeChar none'' */
1077c478bd9Sstevel@tonic-gate #define SSH_ESCAPECHAR_NONE		-2
1087c478bd9Sstevel@tonic-gate 
1097c478bd9Sstevel@tonic-gate /*
1107c478bd9Sstevel@tonic-gate  * unprivileged user when UsePrivilegeSeparation=yes;
1117c478bd9Sstevel@tonic-gate  * sshd will change its privileges to this user and its
1127c478bd9Sstevel@tonic-gate  * primary group.
1137c478bd9Sstevel@tonic-gate  */
1147c478bd9Sstevel@tonic-gate #ifndef SSH_PRIVSEP_USER
1157c478bd9Sstevel@tonic-gate #define SSH_PRIVSEP_USER		"sshd"
1167c478bd9Sstevel@tonic-gate #endif
1177c478bd9Sstevel@tonic-gate 
1187c478bd9Sstevel@tonic-gate /* Minimum modulus size (n) for RSA keys. */
1197c478bd9Sstevel@tonic-gate #define SSH_RSA_MINIMUM_MODULUS_SIZE	768
1207c478bd9Sstevel@tonic-gate 
121*e5e9dedaSjp161948 /*
122*e5e9dedaSjp161948  * Do not display banner when in remote command mode only. Note that RFC 4254
123*e5e9dedaSjp161948  * uses "exec" as a mode name for the channel opened for the execution of the
124*e5e9dedaSjp161948  * given command.
125*e5e9dedaSjp161948  */
126*e5e9dedaSjp161948 #define	SSH_NO_BANNER_IN_EXEC_MODE	2
127*e5e9dedaSjp161948 
1287c478bd9Sstevel@tonic-gate #ifdef __cplusplus
1297c478bd9Sstevel@tonic-gate }
1307c478bd9Sstevel@tonic-gate #endif
1317c478bd9Sstevel@tonic-gate 
1327c478bd9Sstevel@tonic-gate #endif /* _SSH_H */
133