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