.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: sshd.8,v 1.128 2001/06/22 10:17:51 mpech Exp $
+.\" $OpenBSD: sshd.8,v 1.139 2001/08/01 22:16:45 markus Exp $
.Dd September 25, 1999
.Dt SSHD 8
.Os
.Ss SSH protocol version 2
.Pp
Version 2 works similarly:
-Each host has a host-specific DSA key used to identify the host.
+Each host has a host-specific key (RSA or DSA) used to identify the host.
However, when the daemon starts, it does not generate a server key.
Forward security is provided through a Diffie-Hellman key agreement.
This key agreement results in a shared session key.
.It Fl b Ar bits
Specifies the number of bits in the ephemeral protocol version 1
server key (default 768).
-.Pp
.It Fl d
Debug mode.
The server sends verbose debug output to the system
Nothing is sent to the system log.
Normally the beginning,
authentication, and termination of each connection is logged.
+.It Fl t
+Test mode.
+Only check the validity of the configuration file and sanity of the keys.
+This is useful for updating
+.Nm
+reliably as configuration options may change.
.It Fl u Ar len
This option is used to specify the size of the field
in the
wildcards in the patterns.
Only user names are valid; a numerical user ID isn't recognized.
By default login is allowed regardless of the user name.
+If the pattern takes the form USER@HOST then USER and HOST
+are separately checked, allowing you to restrict logins to particular
+users from particular hosts.
.Pp
.It Cm AuthorizedKeysFile
-Specifies the file that contains the public RSA keys that can be used
-for RSA authentication in protocol version 1.
+Specifies the file that contains the public keys that can be used
+for user authentication.
.Cm AuthorizedKeysFile
may contain tokens of the form %T which are substituted during connection
set-up. The following tokens are defined; %% is replaces by a literal '%',
directory.
The default is
.Dq .ssh/authorized_keys
-.It Cm AuthorizedKeysFile2
-Specifies the file that contains the public keys that can be used
-for public key authentication in protocol version 2.
-.Cm AuthorizedKeysFile2
-may contain tokens of the form %T which are substituted during connection
-set-up. The following tokens are defined; %% is replaces by a literal '%',
-%h is replaced by the home directory of the user being authenticated and
-%u is replaced by the username of that user.
-After expansion,
-.Cm AuthorizedKeysFile2
-is taken to be an absolute path or one relative to the user's home
-directory.
-The default is
-.Dq .ssh/authorized_keys2
.It Cm Banner
In some jurisdictions, sending a warning message before authentication
may be relevant for getting legal protection.
This option is only available for protocol version 2.
.Pp
.It Cm ChallengeResponseAuthentication
-Specifies whether
-challenge response
-authentication is allowed.
-Currently there is only support for
-.Xr skey 1
-authentication.
+Specifies whether challenge response authentication is allowed.
+All authentication styles from
+.Xr login.conf 5
+are supported.
The default is
.Dq yes .
.It Cm CheckMail
.Dq aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour.
.It Cm ClientAliveInterval
Sets a timeout interval in seconds after which if no data has been received
-from the client,
+from the client,
.Nm
will send a message through the encrypted
channel to request a response from the client.
sent without
.Nm
receiving any messages back from the client. If this threshold is
-reached while client alive messages are being sent,
+reached while client alive messages are being sent,
.Nm
will disconnect the client, terminating the session. It is important
-to note that the use of client alive messages is very different from
+to note that the use of client alive messages is very different from
.Cm Keepalive
(below). The client alive messages are sent through the
encrypted channel and therefore will not be spoofable. The TCP keepalive
The default value is 3. If you set
.Cm ClientAliveInterval
(above) to 15, and leave this value at the default, unresponsive ssh clients
-will be disconnected after approximately 45 seconds.
+will be disconnected after approximately 45 seconds.
.It Cm DenyGroups
This keyword can be followed by a number of group names, separated
by spaces.
Note that
.Xr login 1
is never used for remote command execution.
-Note also, that if this is enabled,
-.Cm X11Forwarding
+Note also, that if this is enabled,
+.Cm X11Forwarding
will be disabled because
.Xr login 1
does not know how to handle
-.Xr xauth 1
+.Xr xauth 1
cookies.
.It Cm X11DisplayOffset
Specifies the first display number available for
.Dq no .
Note that disabling X11 forwarding does not improve security in any
way, as users can always install their own forwarders.
-X11 forwarding is automatically disabled if
-.Cm UseLogin
-is enabled.
+X11 forwarding is automatically disabled if
+.Cm UseLogin
+is enabled.
.It Cm XAuthLocation
Specifies the location of the
.Xr xauth 1
.El
.Sh AUTHORIZED_KEYS FILE FORMAT
.Pa $HOME/.ssh/authorized_keys
-is the default file that lists the RSA keys that are
-permitted for RSA authentication in protocol version 1.
-.Cm AuthorizedKeysFile
-may be used to specify an alternative file.
-Similarly,
-.Pa $HOME/.ssh/authorized_keys2
-is the default file that lists the DSA and RSA keys that are
-permitted for public key authentication (PubkeyAuthentication)
+is the default file that lists the public keys that are
+permitted for RSA authentication in protocol version 1
+and for public key authentication (PubkeyAuthentication)
in protocol version 2.
-.Cm AuthorizedKeysFile2
+.Cm AuthorizedKeysFile
may be used to specify an alternative file.
.Pp
Each line of the file contains one
.It Cm no-pty
Prevents tty allocation (a request to allocate a pty will fail).
.It Cm permitopen="host:port"
-Limit local
+Limit local
.Li ``ssh -L''
port forwarding such that it may only connect to the specified host and
-port. Multiple
+port. Multiple
.Cm permitopen
-options may be applied separated by commas. No pattern matching is
-performed on the specified hostnames, they must be literal domains or
+options may be applied separated by commas. No pattern matching is
+performed on the specified hostnames, they must be literal domains or
addresses.
.El
.Ss Examples
.Sh SSH_KNOWN_HOSTS FILE FORMAT
The
.Pa /etc/ssh_known_hosts ,
-.Pa /etc/ssh_known_hosts2 ,
-.Pa $HOME/.ssh/known_hosts ,
and
-.Pa $HOME/.ssh/known_hosts2
+.Pa $HOME/.ssh/known_hosts
files contain host public keys for all known hosts.
The global file should
be prepared by the administrator (optional), and the per-user file is
the user so their contents can be copied to known hosts files.
These files are created using
.Xr ssh-keygen 1 .
-.It Pa /etc/primes
+.It Pa /etc/moduli
Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".
.It Pa /var/run/sshd.pid
Contains the process ID of the
started last).
The content of this file is not sensitive; it can be world-readable.
.It Pa $HOME/.ssh/authorized_keys
-Lists the RSA keys that can be used to log into the user's account.
-This file must be readable by root (which may on some machines imply
-it being world-readable if the user's home directory resides on an NFS
-volume).
-It is recommended that it not be accessible by others.
-The format of this file is described above.
-Users will place the contents of their
-.Pa identity.pub
-files into this file, as described in
-.Xr ssh-keygen 1 .
-.It Pa $HOME/.ssh/authorized_keys2
Lists the public keys (RSA or DSA) that can be used to log into the user's account.
This file must be readable by root (which may on some machines imply
it being world-readable if the user's home directory resides on an NFS
It is recommended that it not be accessible by others.
The format of this file is described above.
Users will place the contents of their
+.Pa identity.pub ,
.Pa id_dsa.pub
and/or
.Pa id_rsa.pub
.Xr ssh-keygen 1 .
.It Pa "/etc/ssh_known_hosts" and "$HOME/.ssh/known_hosts"
These files are consulted when using rhosts with RSA host
-authentication to check the public key of the host.
+authentication or protocol version 2 hostbased authentication
+to check the public key of the host.
The key must be listed in one of these files to be accepted.
The client uses the same files
to verify that it is connecting to the correct remote host.
should be world-readable, and
.Pa $HOME/.ssh/known_hosts
can but need not be world-readable.
-.It Pa "/etc/ssh_known_hosts2" and "$HOME/.ssh/known_hosts2"
-These files are consulted when using protocol version 2 hostbased
-authentication to check the public key of the host.
-The key must be listed in one of these files to be accepted.
-The client uses the same files
-to verify that it is connecting to the correct remote host.
-These files should be writable only by root/the owner.
-.Pa /etc/ssh_known_hosts2
-should be world-readable, and
-.Pa $HOME/.ssh/known_hosts2
-can but need not be world-readable.
.It Pa /etc/nologin
If this file exists,
.Nm
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
.Sh SEE ALSO
-.Xr rlogin 1 ,
-.Xr rsh 1 ,
.Xr scp 1 ,
.Xr sftp 1 ,
.Xr ssh 1 ,
.Xr ssh-add 1 ,
.Xr ssh-agent 1 ,
.Xr ssh-keygen 1 ,
+.Xr login.conf 5 ,
+.Xr moduli 5 ,
.Xr sftp-server 8
.Rs
.%A T. Ylonen
.%A T. Rinne
.%A S. Lehtinen
.%T "SSH Protocol Architecture"
-.%N draft-ietf-secsh-architecture-07.txt
-.%D January 2001
+.%N draft-ietf-secsh-architecture-09.txt
+.%D July 2001
.%O work in progress material
.Re
.Rs
.%A N. Provos
.%A W. A. Simpson
.%T "Diffie-Hellman Group Exchange for the SSH Transport Layer Protocol"
-.%N draft-ietf-secsh-dh-group-exchange-00.txt
-.%D January 2001
+.%N draft-ietf-secsh-dh-group-exchange-01.txt
+.%D April 2001
.%O work in progress material
.Re