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