Annotation of src/usr.bin/ssh/sshd.8.in, Revision 1.1
1.1 ! deraadt 1: .\" -*- nroff -*-
! 2: .\"
! 3: .\" sshd.8.in
! 4: .\"
! 5: .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
! 6: .\"
! 7: .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
! 8: .\" All rights reserved
! 9: .\"
! 10: .\" Created: Sat Apr 22 21:55:14 1995 ylo
! 11: .\"
! 12: .\" $Id: sshd.8.in,v 1.7 1999/06/06 08:38:58 bg Exp $
! 13: .\"
! 14: .TH SSHD 8 "November 8, 1995" "SSH" "SSH"
! 15:
! 16: .SH NAME
! 17: sshd \- secure shell daemon
! 18:
! 19: .SH SYNOPSIS
! 20: .na
! 21: .B sshd
! 22: [\c
! 23: .BI \-b \ bits\fR\c
! 24: ]
! 25: [\c
! 26: .B \-d \c
! 27: ]
! 28: [\c
! 29: .BI \-f \ config_file\fR\c
! 30: ]
! 31: [\c
! 32: .BI \-g \ login_grace_time\fR\c
! 33: ]
! 34: [\c
! 35: .BI \-h \ host_key_file\fR\c
! 36: ]
! 37: [\c
! 38: .B \-i \c
! 39: ]
! 40: [\c
! 41: .BI \-k \ key_gen_time\fR\c
! 42: ]
! 43: [\c
! 44: .BI \-p \ port\fR\c
! 45: ]
! 46: [\c
! 47: .B \-q \c
! 48: ]
! 49: .ad
! 50:
! 51:
! 52: .SH DESCRIPTION
! 53: .LP
! 54: .B Sshd
! 55: (Secure Shell Daemon) is the daemon program for
! 56: .BR ssh ".
! 57: Together these programs replace rlogin and rsh programs, and
! 58: provide secure encrypted communications between two untrusted hosts
! 59: over an insecure network. The programs are intended to be as easy to
! 60: install and use as possible.
! 61: .LP
! 62: .B Sshd
! 63: is the daemon that listens for connections from clients. It is
! 64: normally started at boot from
! 65: .I /etc/rc.local
! 66: or equivalent. It forks a new
! 67: daemon for each incoming connection. The forked daemons handle
! 68: key exchange, encryption, authentication, command execution,
! 69: and data exchange.
! 70: .LP
! 71: Sshd works as follows. Each host has a host-specific RSA key
! 72: (normally 1024 bits) used to identify the host. Additionally, when
! 73: the daemon starts, it generates a server RSA key (normally 768 bits).
! 74: This key is normally regenerated every hour if it has been used, and
! 75: is never stored on disk.
! 76: .LP
! 77: Whenever a client connects the daemon, the daemon sends its host
! 78: and server public keys to the client. The client compares the
! 79: host key against its own database to verify that it has not changed.
! 80: The client then generates a 256 bit random number. It encrypts this
! 81: random number using both the host key and the server key, and sends
! 82: the encrypted number to the server. Both sides then start to use this
! 83: random number as a session key which is used to encrypt all further
! 84: communications in the session. The rest of the session is encrypted
! 85: using a conventional cipher. Currently,
! 86: .BR \s-1Blowfish\s0 ",
! 87: .BR \s-1IDEA\s0 ",
! 88: .BR \s-1DES\s0 ",
! 89: .BR \s-1\&3DES\s0 ",
! 90: .B \s-13DES\s0
! 91: is used by default. The client selects the encryption algorithm to use
! 92: from those offered by the server.
! 93: .LP
! 94: Next, the server and the client enter an authentication dialog. The
! 95: client tries to authenticate itself using \|\s+2.\s0rhosts
! 96: authentication, \|\s+2.\s0rhosts authentication combined with RSA host
! 97: authentication, RSA challenge-response authentication, or password
! 98: based authentication.
! 99: .LP
! 100: Rhosts authentication is normally disabled
! 101: because it is fundamentally insecure, but can be enabled in the server
! 102: configuration file if desired. System security is not improved unless
! 103: .BR rshd "(8),
! 104: .BR rlogind "(8),
! 105: .BR rexecd "(8), and
! 106: .B rexd "(8)
! 107: are disabled (thus completely disabling
! 108: .BR rlogin (1)
! 109: and
! 110: .BR rsh (1)
! 111: into that machine).
! 112: .LP
! 113: If the client successfully authenticates itself, a dialog for
! 114: preparing the session is entered. At this time the client may request
! 115: things like allocating a pseudo-tty, forwarding X11 connections,
! 116: forwarding TCP/IP connections, or forwarding the authentication agent
! 117: connection over the secure channel.
! 118: .LP
! 119: Finally, the client either requests a shell or execution of a command.
! 120: The sides then enter session mode. In this mode, either side may send
! 121: data at any time, and such data is forwarded to/from the shell or
! 122: command on the server side, and the user terminal in the client side.
! 123: .LP
! 124: When the user program terminates and all forwarded X11 and other
! 125: connections have been closed, the server sends command exit status to
! 126: the client, and both sides exit.
! 127: .LP
! 128: .B Sshd
! 129: can be configured using command-line options or a configuration
! 130: file. Command-line options override values specified in the
! 131: configuration file.
! 132:
! 133:
! 134: .SH OPTIONS
! 135: .TP
! 136: .BI \-b \ bits
! 137: Specifies the number of bits in the server key (default 768).
! 138: .TP
! 139: .B \-d
! 140: Debug mode. The server sends verbose debug output to the system
! 141: log, and does not put itself in the background. The server also will
! 142: not fork and will only process one connection. This option is only
! 143: intended for debugging for the server.
! 144: .TP
! 145: .BI \-f \ configuration_file
! 146: Specifies the name of the configuration file. The default is
! 147: .IR @ETCDIR@/sshd_config ".
! 148: .TP
! 149: .BI \-g \ login_grace_time
! 150: Gives the grace time for clients to authenticate themselves (default
! 151: 300 seconds). If the client fails to authenticate the user within
! 152: this many seconds, the server disconnects and exits. A value of zero
! 153: indicates no limit.
! 154: .TP
! 155: .BI \-h \ host_key_file
! 156: Specifies the file from which the host key is read (default
! 157: .IR @ETCDIR@/ssh_host_key).
! 158: This option must be given if sshd is not run as root (as the normal
! 159: host file is normally not readable by anyone but root).
! 160: .TP
! 161: .B \-i
! 162: Specifies that sshd is being run from inetd. Sshd is normally not run
! 163: from inetd because it needs to generate the server key before it can
! 164: respond to the client, and this may take tens of seconds. Clients
! 165: would have to wait too long if the key was regenerated every time.
! 166: However, with small key sizes (e.g. 512) using sshd from inetd may
! 167: be feasible.
! 168: .TP
! 169: .BI \-k \ key_gen_time
! 170: Specifies how often the server key is regenerated (default 3600
! 171: seconds, or one hour). The motivation for regenerating the key fairly
! 172: often is that the key is not stored anywhere, and after about an hour,
! 173: it becomes impossible to recover the key for decrypting intercepted
! 174: communications even if the machine is cracked into or physically
! 175: seized. A value of zero indicates that the key will never be regenerated.
! 176: .TP
! 177: .BI \-p \ port
! 178: Specifies the port on which the server listens for connections
! 179: (default 22).
! 180: .TP
! 181: .B \-q
! 182: Quiet mode. Nothing is sent to the system log. Normally the beginning,
! 183: authentication, and termination of each connection is logged.
! 184:
! 185: .SH CONFIGURATION FILE
! 186:
! 187: .B Sshd
! 188: reads configuration data from
! 189: .I @ETCDIR@/sshd_config
! 190: (or the file specified with -f on the command line). The file
! 191: contains keyword-value pairs, one per line. Lines starting with '#'
! 192: and empty lines are interpreted as comments.
! 193:
! 194: The following keywords are possible.
! 195: .TP
! 196: .B AFSTokenPassing
! 197: Specifies whether to accept AFS tokens passed from the client. Default
! 198: is "yes".
! 199: .TP
! 200: .B AllowHosts
! 201: This keyword can be followed by any number of host name patterns,
! 202: separated by spaces. If specified, login is allowed only from hosts
! 203: whose name matches one of the patterns. '*' and '?' can be used as
! 204: wildcards in the patterns. Normal name servers are used to map the
! 205: client's host into a canonical host name. If the name cannot be
! 206: mapped, its IP-address is used as the host name. By default all hosts
! 207: are allowed to connect.
! 208:
! 209: Note that
! 210: .B sshd
! 211: can also be configured to use tcp_wrappers using the --with-libwrap
! 212: compile-time configuration option.
! 213: .TP
! 214: .B DenyHosts
! 215: This keyword can be followed by any number of host name patterns,
! 216: separated by spaces. If specified, login is disallowed from the hosts
! 217: whose name matches any of the patterns.
! 218: .TP
! 219: .B FascistLogging
! 220: Specifies whether to use verbose logging. Verbose logging violates
! 221: the privacy of users and is not recommended. The argument must be
! 222: "yes" or "no" (without the quotes). The default is "no".
! 223: .TP
! 224: .B HostKey
! 225: Specifies the file containing the private host key (default
! 226: .IR @ETCDIR@/ssh_host_key ").
! 227: .TP
! 228: .B IgnoreRhosts
! 229: Specifies that rhosts and shosts files will not be used in
! 230: authentication.
! 231: .I /etc/hosts.equiv
! 232: and
! 233: .I @ETCDIR@/shosts.equiv
! 234: are still used. The default is "no".
! 235: .TP
! 236: .B KeepAlive
! 237: Specifies whether the system should send keepalive messages to the
! 238: other side. If they are sent, death of the connection or crash of one
! 239: of the machines will be properly noticed. However, this means that
! 240: connections will die if the route is down temporarily, and some people
! 241: find it annoying. On the other hand, if keepalives are not send,
! 242: sessions may hang indefinitely on the server, leaving "ghost" users
! 243: and consuming server resources.
! 244:
! 245: The default is "yes" (to send keepalives), and the server will notice
! 246: if the network goes down or the client host reboots. This avoids
! 247: infinitely hanging sessions.
! 248:
! 249: To disable keepalives, the value should be set to "no" in both the
! 250: server and the client configuration files.
! 251: .TP
! 252: .B KerberosAuthentication
! 253: Specifies whether Kerberos authentication is allowed. This can
! 254: be in the form of a Kerberos ticket, or if PasswordAuthentication
! 255: is yes, the password provided by the user will be validated through
! 256: the Kerberos KDC / AFS kaserver / DCE Security Server. Default is yes.
! 257: .TP
! 258: .B KerberosOrLocalPasswd
! 259: If set then if password authentication through Kerberos fails then
! 260: the password will be validated via any additional local mechanism
! 261: such as /etc/passwd or SecurID. Default is no.
! 262: .TP
! 263: .B KerberosTgtPassing
! 264: Specifies whether a Kerberos TGT may be forwarded to the server.
! 265: Default is no, TGT forwarding does only work with the AFS kaserver.
! 266: .TP
! 267: .B KerberosTicketCleanup
! 268: Specifies whether to automatically destroy the user's
! 269: ticket cache file on logout. Default is yes.
! 270: .TP
! 271: .B KeyRegenerationInterval
! 272: The server key is automatically regenerated after this many seconds
! 273: (if it has been used). The purpose of regeneration is to prevent
! 274: decrypting captured sessions by later breaking into the machine and
! 275: stealing the keys. The key is never stored anywhere. If the value is
! 276: 0, the key is never regenerated. The default is 3600
! 277: (seconds).
! 278: .TP
! 279: .B LoginGraceTime
! 280: The server disconnects after this time if the user has not
! 281: successfully logged in. If the value is 0, there is no time limit.
! 282: The default is 600 (seconds).
! 283: .TP
! 284: .B PasswordAuthentication
! 285: Specifies whether password authentication is allowed.
! 286: The default is "yes".
! 287: .TP
! 288: .B PermitEmptyPasswords
! 289: When password authentication is allowed, it specifies whether the
! 290: server allows login to accounts with empty password strings. The default
! 291: is "yes".
! 292: .TP
! 293: .B PermitRootLogin
! 294: Specifies whether the root can log in using
! 295: .BR ssh .
! 296: The default is "yes".
! 297:
! 298: Root login with RSA authentication when the "command" option has been
! 299: specified will be allowed regardless of the value of this setting
! 300: (which may be useful for taking remote backups even if root login is
! 301: normally not allowed).
! 302: .TP
! 303: .B Port
! 304: Specifies the port number that
! 305: .B sshd
! 306: listens on. The default is 22.
! 307: .TP
! 308: .B PrintMotd
! 309: Specifies whether
! 310: .B sshd
! 311: should print
! 312: .I /etc/motd
! 313: when a user logs in interactively. (On some systems it is also
! 314: printed by the shell, /etc/profile, or equivalent.) The default is
! 315: "yes".
! 316: .TP
! 317: .B QuietMode
! 318: Specifies whether the system runs in quiet mode. In quiet mode,
! 319: nothing is logged in the system log, except fatal errors. The default
! 320: is "no".
! 321: .TP
! 322: .B RandomSeed
! 323: Specifies the file containing the random seed for the server; this
! 324: file is created automatically and updated regularly. The default is
! 325: .IR @ETCDIR@/ssh_random_seed ".
! 326: .TP
! 327: .B RhostsAuthentication
! 328: Specifies whether authentication using rhosts or /etc/hosts.equiv
! 329: files is sufficient. Normally, this method should not be permitted
! 330: because it is insecure. RhostsRSAAuthentication should be used
! 331: instead, because it performs RSA-based host authentication in addition
! 332: to normal rhosts or /etc/hosts.equiv authentication.
! 333: The default is "no".
! 334: .TP
! 335: .B RhostsRSAAuthentication
! 336: Specifies whether rhosts or /etc/hosts.equiv authentication together
! 337: with successful RSA host authentication is allowed. The default is "yes".
! 338: .TP
! 339: .B RSAAuthentication
! 340: Specifies whether pure RSA authentication is allowed. The default is "yes".
! 341: .TP
! 342: .B ServerKeyBits
! 343: Defines the number of bits in the server key. The minimum value is
! 344: 512, and the default is 768.
! 345: .TP
! 346: .B StrictModes
! 347: Specifies whether ssh should check file modes and ownership of the
! 348: user's home directory and rhosts files before accepting login. This
! 349: is normally desirable because novices sometimes accidentally leave their
! 350: directory or files world-writable. The default is "yes".
! 351: .TP
! 352: .B SyslogFacility
! 353: Gives the facility code that is used when logging messages from
! 354: .B sshd.
! 355: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
! 356: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The default is DAEMON.
! 357: .TP
! 358: .B X11Forwarding
! 359: Specifies whether X11 forwarding is permitted. The default is "yes".
! 360: Note that disabling X11 forwarding does not improve security in any
! 361: way, as users can always install their own forwarders.
! 362:
! 363: .SH LOGIN PROCESS
! 364:
! 365: When a user successfully logs in,
! 366: .B sshd
! 367: does the following:
! 368: .IP 1.
! 369: If the login is on a tty, and no command has been specified,
! 370: prints last login time and
! 371: .B /etc/motd
! 372: (unless prevented in the configuration file or by
! 373: .IR $HOME/\s+2.\s0hushlogin ;
! 374: see the FILES section).
! 375: .IP 2.
! 376: If the login is on a tty, records login time.
! 377: .IP 3.
! 378: Checks /etc/nologin; if it exists, prints contents and quits
! 379: (unless root).
! 380: .IP 4.
! 381: Changes to run with normal user privileges.
! 382: .IP 5.
! 383: Sets up basic environment.
! 384: .IP 6.
! 385: Reads /etc/environment if it exists.
! 386: .IP 7.
! 387: Reads $HOME/.ssh/environment if it exists.
! 388: .IP 8.
! 389: Changes to user's home directory.
! 390: .IP 9.
! 391: If $HOME/.ssh/rc exists, runs it; else if @ETCDIR@/sshrc exists, runs
! 392: it; otherwise runs xauth. The "rc" files are given the X11
! 393: authentication protocol and cookie in standard input.
! 394: .IP 10.
! 395: Runs user's shell or command.
! 396: .RT
! 397:
! 398:
! 399: .SH AUTHORIZED_KEYS FILE FORMAT
! 400: .LP
! 401: The
! 402: .I \&$HOME/\s+2.\s0ssh/authorized_keys
! 403: file lists the RSA keys that are
! 404: permitted for RSA authentication. Each line of the file contains one
! 405: key (empty lines and lines starting with a '#' are ignored as
! 406: comments). Each line consists of the following fields, separated by
! 407: spaces: options, bits, exponent, modulus, comment. The options field
! 408: is optional; its presence is determined by whether the line starts
! 409: with a number or not (the option field never starts with a number).
! 410: The bits, exponent, modulus and comment fields give the RSA key; the
! 411: comment field is not used for anything (but may be convenient for the
! 412: user to identify the key).
! 413: .LP
! 414: Note that lines in this file are usually several hundred bytes long
! 415: (because of the size of the RSA key modulus). You don't want to type
! 416: them in; instead, copy the
! 417: .I identity.pub
! 418: file and edit it.
! 419: .LP
! 420: The options (if present) consists of comma-separated option
! 421: specifications. No spaces are permitted, except within double quotes.
! 422: The following option specifications are supported:
! 423: .IP
! 424: .ti -.5i
! 425: \fBfrom="pattern-list" \fR
! 426: .br
! 427: Specifies that in addition to RSA authentication, the canonical name
! 428: of the remote host must be present in the comma-separated list of
! 429: patterns ('*' and '?' serve as wildcards). The list may also contain
! 430: patterns negated by prefixing them with '!'; if the canonical host
! 431: name matches a negated pattern, the key is not accepted. The purpose
! 432: of this option is to optionally increase security: RSA authentication
! 433: by itself does not trust the network or name servers or anything (but
! 434: the key); however, if somebody somehow steals the key, the key
! 435: permits an intruder to log in from anywhere in the world. This
! 436: additional option makes using a stolen key more difficult (name
! 437: servers and/or routers would have to be compromised in addition to
! 438: just the key).
! 439: .IP
! 440: .ti -.5i
! 441: \fBcommand="command"\fR
! 442: .br
! 443: Specifies that the command is executed whenever this key is used for
! 444: authentication. The command supplied by the user (if any) is ignored.
! 445: The command is run on a pty if the connection requests a pty;
! 446: otherwise it is run without a tty. A quote may be included in the
! 447: command by quoting it with a backslash. This option might be useful
! 448: to restrict certain RSA keys to perform just a specific operation. An
! 449: example might be a key that permits remote backups but nothing
! 450: else. Notice that the client may specify TCP/IP and/or X11
! 451: forwardings unless they are explicitly prohibited.
! 452: .IP
! 453: .ti -.5i
! 454: \fBenvironment="NAME=value"\fR
! 455: .br
! 456: Specifies that the string is to be added to the environment when
! 457: logging in using this key. Environment variables set this way
! 458: override other default environment values. Multiple options of this
! 459: type are permitted.
! 460: .TP
! 461: .B no-port-forwarding
! 462: Forbids TCP/IP forwarding when this key is used for authentication.
! 463: Any port forward requests by the client will return an error. This
! 464: might be used e.g. in connection with the
! 465: .B command
! 466: option.
! 467: .TP
! 468: .B no-X11-forwarding
! 469: Forbids X11 forwarding when this key is used for authentication.
! 470: Any X11 forward requests by the client will return an error.
! 471: .TP
! 472: .B no-agent-forwarding
! 473: Forbids authentication agent forwarding when this key is used for
! 474: authentication.
! 475: .TP
! 476: .B no-pty
! 477: Prevents tty allocation (a request to allocate a pty will fail).
! 478:
! 479: .SS Examples
! 480: .LP
! 481: 1024 33 12121.\|.\|.\|312314325 ylo@foo.bar
! 482: .LP
! 483: from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23.\|.\|.\|2334 ylo@niksula
! 484: .LP
! 485: command="dump /home",no-pty,no-port-forwarding 1024 33 23.\|.\|.\|2323 backup.hut.fi
! 486:
! 487:
! 488:
! 489: .SH SSH_KNOWN_HOSTS FILE FORMAT
! 490: .LP
! 491: The
! 492: .I @ETCDIR@/ssh_known_hosts
! 493: and
! 494: .I \&$HOME/\s+2.\s0ssh/known_hosts
! 495: files contain host public keys for all known hosts. The global file should
! 496: be prepared by the admistrator (optional), and the per-user file is
! 497: maintained automatically: whenever the user connects an unknown host
! 498: its key is added to the per-user file. The recommended way to create
! 499: .I @ETCDIR@/ssh_known_hosts
! 500: is to use the
! 501: .B make-ssh-known-hosts
! 502: command.
! 503: .LP
! 504: Each line in these files contains the following fields: hostnames,
! 505: bits, exponent, modulus, comment. The fields are separated by spaces.
! 506: .LP
! 507: Hostnames is a comma-separated list of patterns ('*' and '?' act as
! 508: wildcards); each pattern in turn is matched against the canonical host
! 509: name (when authenticating a client) or against the user-supplied
! 510: name (when authenticating a server). A pattern may also be preceded
! 511: by '!' to indicate negation: if the host name matches a negated
! 512: pattern, it is not accepted (by that line) even if it matched another
! 513: pattern on the line.
! 514: .LP
! 515: Bits, exponent, and modulus are taken directly from the host key; they
! 516: can be obtained e.g. from
! 517: .IR @ETCDIR@/ssh_host_key.pub ".
! 518: The optional comment field continues to the end of the line, and is not used.
! 519: .LP
! 520: Lines starting with '#' and empty lines are ignored as comments.
! 521: .LP
! 522: When performing host authentication, authentication is accepted if any
! 523: matching line has the proper key. It is thus permissible (but not
! 524: recommended) to have several lines or different host keys for the same
! 525: names. This will inevitably happen when short forms of host names
! 526: from different domains are put in the file. It is possible
! 527: that the files contain conflicting information; authentication is
! 528: accepted if valid information can be found from either file.
! 529: .LP
! 530: Note that the lines in these files are typically hundreds of characters
! 531: long, and you definitely don't want to type in the host keys by hand.
! 532: Rather, generate them by a script (see
! 533: .BR make-ssh-known-hosts (1))
! 534: or by taking
! 535: .I @ETCDIR@/ssh_host_key.pub
! 536: and adding the host names at the front.
! 537:
! 538: .SS Examples
! 539:
! 540: closenet,closenet.hut.fi,.\|.\|.\|,130.233.208.41 1024 37 159.\|.\|.93 closenet.hut.fi
! 541:
! 542: .SH FILES
! 543: .TP
! 544: .I @ETCDIR@/sshd_config
! 545: Contains configuration data for
! 546: .BR sshd .
! 547: This file should be writable by root only, but it is recommended
! 548: (though not necessary) that it be world-readable.
! 549: .TP
! 550: .I @ETCDIR@/ssh_host_key
! 551: Contains the private part of the host key. This file is normally
! 552: created automatically by "make install", but can also be created
! 553: manually using
! 554: .BR ssh-keygen (1).
! 555: This file should only be owned by root, readable only by root, and not
! 556: accessible to others.
! 557: .TP
! 558: .I @ETCDIR@/ssh_host_key.pub
! 559: Contains the public part of the host key. This file is normally
! 560: created automatically by "make install", but can also be created
! 561: manually. This file should be world-readable but writable only by
! 562: root. Its contents should match the private part. This file is not
! 563: really used for anything; it is only provided for the convenience of
! 564: the user so its contents can be copied to known hosts files.
! 565: .TP
! 566: .I @ETCDIR@/ssh_random_seed
! 567: This file contains a seed for the random number generator. This file
! 568: should only be accessible by root.
! 569: .TP
! 570: .I @PIDDIR@/sshd.pid
! 571: Contains the process id of the
! 572: .B sshd
! 573: listening for connections (if there are several daemons running
! 574: concurrently for different ports, this contains the pid of the one
! 575: started last). The contents of this file are not sensitive; it can be
! 576: world-readable.
! 577: .TP
! 578: .I \&$HOME/\s+2.\s0ssh/authorized_keys
! 579: Lists the RSA keys that can be used to log into the user's account.
! 580: This file must be readable by root (which may on some machines imply
! 581: it being world-readable if the user's home directory resides on an NFS
! 582: volume). It is recommended that it not be accessible by others. The
! 583: format of this file is described above.
! 584: .TP
! 585: .I "@ETCDIR@/ssh_known_hosts\fR and \fI$HOME/\s+2.\s0ssh/known_hosts\fR
! 586: These files are consulted when using rhosts with RSA host
! 587: authentication to check the public key of the host. The key must be
! 588: listed in one of these files to be accepted. (The client uses the
! 589: same files to verify that the remote host is the one we intended to
! 590: connect.) These files should be writable only by root/the owner.
! 591: .I @ETCDIR@/ssh_known_hosts
! 592: should be world-readable, and \fI$HOME/\s+2.\s0ssh/known_hosts\fR can
! 593: but need not be world-readable.
! 594: .TP
! 595: .I /etc/nologin
! 596: If this file exists,
! 597: .B sshd
! 598: refuses to let anyone except root log in. The contents of the file
! 599: are displayed to anyone trying to log in, and non-root connections are
! 600: refused. The file should be world-readable.
! 601: .TP
! 602: .I \&$HOME/\s+2.\s0rhosts
! 603: This file contains host-username pairs, separated by a space, one per
! 604: line. The given user on the corresponding host is permitted to log in
! 605: without password. The same file is used by rlogind and rshd.
! 606: .B Ssh
! 607: differs from rlogind
! 608: and rshd in that it requires RSA host authentication in addition to
! 609: validating the host name retrieved from domain name servers (unless
! 610: compiled with the \-\-with\-rhosts configuration option). The file must
! 611: be writable only by the user; it is recommended that it not be
! 612: accessible by others.
! 613:
! 614: If is also possible to use netgroups in the file. Either host or user
! 615: name may be of the form +@groupname to specify all hosts or all users
! 616: in the group.
! 617: .TP
! 618: .I \&$HOME/\s+2.\s0shosts
! 619: For
! 620: .B ssh,
! 621: this file is exactly the same as for \s+2.\s0rhosts. However, this file is
! 622: not used by rlogin and rshd, so using this permits access using
! 623: .B ssh
! 624: only.
! 625: .TP
! 626: .I /etc/hosts.equiv
! 627: This file is used during \s+2.\s0rhosts authentication. In the
! 628: simplest form, this file contains host names, one per line. Users on
! 629: those hosts are permitted to log in without a password, provided they
! 630: have the same user name on both machines. The host name may also be
! 631: followed by a user name; such users are permitted to log in as
! 632: .B any
! 633: user on this machine (except root). Additionally, the syntax +@group
! 634: can be used to specify netgroups. Negated entries start with '-'.
! 635:
! 636: If the client host/user is successfully matched in this file, login is
! 637: automatically permitted provided the client and server user names are the
! 638: same. Additionally, successful RSA host authentication is normally
! 639: required. This file must be writable only by root; it is recommended
! 640: that it be world-readable.
! 641:
! 642: \fBWarning: It is almost never a good idea to use user names in
! 643: hosts.equiv.\fR
! 644: Beware that it really means that the named user(s) can log in as
! 645: \fBanybody\fR,
! 646: which includes bin, daemon, adm, and other accounts that own critical
! 647: binaries and directories. Using a user name practically grants the
! 648: user root access. The only valid use for user names that I can think
! 649: of is in negative entries.
! 650: \fBNote that this warning also applies to rsh/rlogin.\fR
! 651: .TP
! 652: .I @ETCDIR@/shosts.equiv
! 653: This is processed exactly as
! 654: .I /etc/hosts.equiv.
! 655: However, this file may be useful in environments that want to run both
! 656: rsh/rlogin and
! 657: .B ssh.
! 658: .TP
! 659: .I /etc/environment
! 660: This file is read into the environment at login (if it exists). It
! 661: can only contain empty lines, comment lines (that start with '#'), and
! 662: assignment lines of the form name=value. This file is processed in
! 663: all environments (normal rsh/rlogin only process it on AIX and
! 664: potentially some other systems). The file should be writable only by
! 665: root, and should be world-readable.
! 666: .TP
! 667: .I \&$HOME/\s+2.\s0ssh/environment
! 668: This file is read into the environment after /etc/environment. It has
! 669: the same format. The file should be writable only by the user; it
! 670: need not be readable by anyone else.
! 671: .TP
! 672: .I \&$HOME/\s+2.\s0ssh/rc
! 673: If this file exists, it is run with /bin/sh after reading the
! 674: environment files but before starting the user's shell or command. If
! 675: X11 spoofing is in use, this will receive the "proto cookie" pair in
! 676: standard input (and DISPLAY in environment). This must call xauth in
! 677: that case.
! 678:
! 679: The primary purpose of this file is to run any initialization routines
! 680: which may be needed before the user's home directory becomes
! 681: accessible; AFS is a particular example of such an environment.
! 682:
! 683: This file will probably contain some initialization code followed by
! 684: something similar to: "if read proto cookie; then echo add $DISPLAY
! 685: $proto $cookie | xauth -q -; fi".
! 686:
! 687: If this file does not exist, @ETCDIR@/sshrc is run, and if that
! 688: does not exist either, xauth is used to store the cookie.
! 689:
! 690: This file should be writable only by the user, and need not be
! 691: readable by anyone else.
! 692: .TP
! 693: .I @ETCDIR@/sshrc
! 694: Like $HOME/\s+2.\s0ssh/rc. This can be used to specify
! 695: machine-specific login-time initializations globally. This file
! 696: should be writable only by root, and should be world-readable.
! 697:
! 698:
! 699: .SH INSTALLATION
! 700: .LP
! 701: .B Sshd
! 702: is normally run as root. If it is not run as root, it can
! 703: only log in as the user it is running as, and password authentication
! 704: may not work if the system uses shadow passwords. An alternative
! 705: host key file must also be used.
! 706: .LP
! 707: .B Sshd
! 708: is normally started from
! 709: .I /etc/rc.local
! 710: or equivalent at system boot.
! 711: .LP
! 712: Considerable work has been put to making
! 713: .B sshd
! 714: secure. However, if you find a security problem, please report it
! 715: immediately to <ssh-bugs@cs.hut.fi>.
! 716:
! 717: .SH AUTHOR
! 718: .LP
! 719: Tatu Ylonen <ylo@cs.hut.fi>
! 720: .LP
! 721: Information about new releases, mailing lists, and other related
! 722: issues can be found from the ssh WWW home page at
! 723: http://www.cs.hut.fi/ssh.
! 724:
! 725: .SH SEE ALSO
! 726: .LP
! 727: .BR ssh (1),
! 728: .BR make-ssh-known-hosts (1),
! 729: .BR ssh-keygen (1),
! 730: .BR ssh-agent (1),
! 731: .BR ssh-add (1),
! 732: .BR scp (1),
! 733: .BR rlogin (1),
! 734: .BR rsh (1)