1999-10-27 11:42:43 +08:00
|
|
|
/*
|
1999-11-24 21:26:21 +08:00
|
|
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
|
|
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
|
|
|
* All rights reserved
|
2000-04-16 09:18:38 +08:00
|
|
|
*
|
2000-09-16 10:29:08 +08:00
|
|
|
* As far as I am concerned, the code I have written for this software
|
|
|
|
* can be used freely for any purpose. Any derived versions of this
|
|
|
|
* software must be clearly marked as such, and if the derived work is
|
|
|
|
* incompatible with the protocol description in the RFC file, it must be
|
|
|
|
* called by a name other than "ssh" or "Secure Shell".
|
1999-11-24 21:26:21 +08:00
|
|
|
*/
|
|
|
|
|
2001-01-24 00:09:51 +08:00
|
|
|
/* RCSID("$OpenBSD: ssh.h,v 1.62 2001/01/23 10:45:10 markus Exp $"); */
|
1999-10-27 11:42:43 +08:00
|
|
|
|
|
|
|
#ifndef SSH_H
|
|
|
|
#define SSH_H
|
|
|
|
|
1999-11-11 07:40:23 +08:00
|
|
|
#include <netinet/in.h> /* For struct sockaddr_in */
|
|
|
|
#include <pwd.h> /* For struct pw */
|
1999-11-11 14:57:39 +08:00
|
|
|
#include <stdarg.h> /* For va_list */
|
2000-11-29 10:51:06 +08:00
|
|
|
#include <syslog.h> /* For LOG_AUTH and friends */
|
2000-01-14 12:45:46 +08:00
|
|
|
#include <sys/socket.h> /* For struct sockaddr_storage */
|
|
|
|
#include "fake-socket.h" /* For struct sockaddr_storage */
|
1999-12-21 21:12:38 +08:00
|
|
|
#ifdef HAVE_SYS_SELECT_H
|
|
|
|
# include <sys/select.h>
|
|
|
|
#endif
|
2001-01-22 13:34:40 +08:00
|
|
|
|
1999-10-27 11:42:43 +08:00
|
|
|
/* Cipher used for encrypting authentication files. */
|
|
|
|
#define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES
|
|
|
|
|
|
|
|
/* Default port number. */
|
|
|
|
#define SSH_DEFAULT_PORT 22
|
|
|
|
|
|
|
|
/* Maximum number of TCP/IP ports forwarded per direction. */
|
|
|
|
#define SSH_MAX_FORWARDS_PER_DIRECTION 100
|
|
|
|
|
1999-11-25 08:54:57 +08:00
|
|
|
/*
|
|
|
|
* Maximum number of RSA authentication identity files that can be specified
|
|
|
|
* in configuration files or on the command line.
|
|
|
|
*/
|
1999-10-27 11:42:43 +08:00
|
|
|
#define SSH_MAX_IDENTITY_FILES 100
|
|
|
|
|
1999-11-25 08:54:57 +08:00
|
|
|
/*
|
|
|
|
* Major protocol version. Different version indicates major incompatiblity
|
|
|
|
* that prevents communication.
|
2000-04-12 18:17:38 +08:00
|
|
|
*
|
1999-11-25 08:54:57 +08:00
|
|
|
* Minor protocol version. Different version indicates minor incompatibility
|
|
|
|
* that does not prevent interoperation.
|
|
|
|
*/
|
2000-04-12 18:17:38 +08:00
|
|
|
#define PROTOCOL_MAJOR_1 1
|
|
|
|
#define PROTOCOL_MINOR_1 5
|
|
|
|
|
|
|
|
/* We support both SSH1 and SSH2 */
|
|
|
|
#define PROTOCOL_MAJOR_2 2
|
|
|
|
#define PROTOCOL_MINOR_2 0
|
1999-10-27 11:42:43 +08:00
|
|
|
|
1999-11-25 08:54:57 +08:00
|
|
|
/*
|
|
|
|
* Name for the service. The port named by this service overrides the
|
|
|
|
* default port if present.
|
|
|
|
*/
|
1999-10-27 11:42:43 +08:00
|
|
|
#define SSH_SERVICE_NAME "ssh"
|
|
|
|
|
2000-04-20 21:12:58 +08:00
|
|
|
#if defined(USE_PAM) && !defined(SSHD_PAM_SERVICE)
|
|
|
|
# define SSHD_PAM_SERVICE "sshd"
|
|
|
|
#endif
|
|
|
|
|
1999-11-25 08:54:57 +08:00
|
|
|
/*
|
|
|
|
* Name of the environment variable containing the pathname of the
|
|
|
|
* authentication socket.
|
|
|
|
*/
|
2001-02-05 23:43:59 +08:00
|
|
|
#define SSH_AGENTPID_ENV_NAME "SSH_AGENT_PID"
|
1999-10-27 11:42:43 +08:00
|
|
|
|
1999-11-25 08:54:57 +08:00
|
|
|
/*
|
|
|
|
* Name of the environment variable containing the pathname of the
|
|
|
|
* authentication socket.
|
|
|
|
*/
|
2001-01-22 13:34:40 +08:00
|
|
|
#define SSH_AUTHSOCKET_ENV_NAME "SSH_AUTH_SOCK"
|
1999-10-29 08:21:15 +08:00
|
|
|
|
1999-12-06 08:47:28 +08:00
|
|
|
/*
|
2001-01-22 13:34:40 +08:00
|
|
|
* Environment variable for overwriting the default location of askpass
|
1999-12-06 08:47:28 +08:00
|
|
|
*/
|
|
|
|
#define SSH_ASKPASS_ENV "SSH_ASKPASS"
|
|
|
|
|
1999-11-25 08:54:57 +08:00
|
|
|
/*
|
|
|
|
* Force host key length and server key length to differ by at least this
|
|
|
|
* many bits. This is to make double encryption with rsaref work.
|
|
|
|
*/
|
1999-10-27 11:42:43 +08:00
|
|
|
#define SSH_KEY_BITS_RESERVED 128
|
|
|
|
|
1999-11-25 08:54:57 +08:00
|
|
|
/*
|
|
|
|
* Length of the session key in bytes. (Specified as 256 bits in the
|
|
|
|
* protocol.)
|
|
|
|
*/
|
1999-10-27 11:42:43 +08:00
|
|
|
#define SSH_SESSION_KEY_LENGTH 32
|
|
|
|
|
|
|
|
/* Name of Kerberos service for SSH to use. */
|
|
|
|
#define KRB4_SERVICE_NAME "rcmd"
|
|
|
|
|
1999-11-24 21:26:21 +08:00
|
|
|
#endif /* SSH_H */
|