summaryrefslogtreecommitdiff
path: root/sshd.0
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.0')
-rw-r--r--sshd.0218
1 files changed, 108 insertions, 110 deletions
diff --git a/sshd.0 b/sshd.0
index 60be52888..937e35906 100644
--- a/sshd.0
+++ b/sshd.0
@@ -1,4 +1,4 @@
1SSHD(8) OpenBSD System Manager's Manual SSHD(8) 1SSHD(8) BSD System ManagerM-bM-^@M-^Ys Manual SSHD(8)
2 2
3NAME 3NAME
4 sshd - OpenSSH SSH daemon 4 sshd - OpenSSH SSH daemon
@@ -14,25 +14,24 @@ DESCRIPTION
14 intended to be as easy to install and use as possible. 14 intended to be as easy to install and use as possible.
15 15
16 sshd is the daemon that listens for connections from clients. It is nor- 16 sshd is the daemon that listens for connections from clients. It is nor-
17 mally started at boot from /etc/rc. It forks a new daemon for each in- 17 mally started at boot from /etc/rc. It forks a new daemon for each
18 coming connection. The forked daemons handle key exchange, encryption, 18 incoming connection. The forked daemons handle key exchange, encryption,
19 authentication, command execution, and data exchange. This implementa- 19 authentication, command execution, and data exchange. This implementa-
20 tion of sshd supports both SSH protocol version 1 and 2 simultaneously. 20 tion of sshd supports both SSH protocol version 1 and 2 simultaneously.
21 sshd works as follows: 21 sshd works as follows:
22 22
23 SSH protocol version 1 23 SSH protocol version 1
24
25 Each host has a host-specific RSA key (normally 1024 bits) used to iden- 24 Each host has a host-specific RSA key (normally 1024 bits) used to iden-
26 tify the host. Additionally, when the daemon starts, it generates a 25 tify the host. Additionally, when the daemon starts, it generates a
27 server RSA key (normally 768 bits). This key is normally regenerated ev- 26 server RSA key (normally 768 bits). This key is normally regenerated
28 ery hour if it has been used, and is never stored on disk. 27 every hour if it has been used, and is never stored on disk.
29 28
30 Whenever a client connects, the daemon responds with its public host and 29 Whenever a client connects, the daemon responds with its public host and
31 server keys. The client compares the RSA host key against its own 30 server keys. The client compares the RSA host key against its own
32 database to verify that it has not changed. The client then generates a 31 database to verify that it has not changed. The client then generates a
33 256 bit random number. It encrypts this random number using both the 32 256 bit random number. It encrypts this random number using both the
34 host key and the server key, and sends the encrypted number to the serv- 33 host key and the server key, and sends the encrypted number to the
35 er. Both sides then use this random number as a session key which is 34 server. Both sides then use this random number as a session key which is
36 used to encrypt all further communications in the session. The rest of 35 used to encrypt all further communications in the session. The rest of
37 the session is encrypted using a conventional cipher, currently Blowfish 36 the session is encrypted using a conventional cipher, currently Blowfish
38 or 3DES, with 3DES being used by default. The client selects the encryp- 37 or 3DES, with 3DES being used by default. The client selects the encryp-
@@ -40,19 +39,19 @@ DESCRIPTION
40 39
41 Next, the server and the client enter an authentication dialog. The 40 Next, the server and the client enter an authentication dialog. The
42 client tries to authenticate itself using .rhosts authentication, .rhosts 41 client tries to authenticate itself using .rhosts authentication, .rhosts
43 authentication combined with RSA host authentication, RSA challenge-re- 42 authentication combined with RSA host authentication, RSA challenge-
44 sponse authentication, or password based authentication. 43 response authentication, or password based authentication.
45 44
46 Regardless of the authentication type, the account is checked to ensure 45 Regardless of the authentication type, the account is checked to ensure
47 that it is accessible. An account is not accessible if it is locked, 46 that it is accessible. An account is not accessible if it is locked,
48 listed in DenyUsers or its group is listed in DenyGroups . The defini- 47 listed in DenyUsers or its group is listed in DenyGroups . The defini-
49 tion of a locked account is system dependant. Some platforms have their 48 tion of a locked account is system dependant. Some platforms have their
50 own account database (eg AIX) and some modify the passwd field ( `*LK*' 49 own account database (eg AIX) and some modify the passwd field ( M-bM-^@M-^X*LK*M-bM-^@M-^Y
51 on Solaris, `*' on HP-UX, containing `Nologin' on Tru64 and a leading 50 on Solaris, M-bM-^@M-^X*M-bM-^@M-^Y on HP-UX, containing M-bM-^@M-^XNologinM-bM-^@M-^Y on Tru64 and a leading
52 `!!' on Linux). If there is a requirement to disable password authenti- 51 M-bM-^@M-^X!!M-bM-^@M-^Y on Linux). If there is a requirement to disable password authenti-
53 cation for the account while allowing still public-key, then the passwd 52 cation for the account while allowing still public-key, then the passwd
54 field should be set to something other than these values (eg `NP' or 53 field should be set to something other than these values (eg M-bM-^@M-^XNPM-bM-^@M-^Y or
55 `*NP*' ). 54 M-bM-^@M-^X*NP*M-bM-^@M-^Y ).
56 55
57 Rhosts authentication is normally disabled because it is fundamentally 56 Rhosts authentication is normally disabled because it is fundamentally
58 insecure, but can be enabled in the server configuration file if desired. 57 insecure, but can be enabled in the server configuration file if desired.
@@ -60,7 +59,6 @@ DESCRIPTION
60 abled (thus completely disabling rlogin and rsh into the machine). 59 abled (thus completely disabling rlogin and rsh into the machine).
61 60
62 SSH protocol version 2 61 SSH protocol version 2
63
64 Version 2 works similarly: Each host has a host-specific key (RSA or DSA) 62 Version 2 works similarly: Each host has a host-specific key (RSA or DSA)
65 used to identify the host. However, when the daemon starts, it does not 63 used to identify the host. However, when the daemon starts, it does not
66 generate a server key. Forward security is provided through a Diffie- 64 generate a server key. Forward security is provided through a Diffie-
@@ -69,9 +67,10 @@ DESCRIPTION
69 67
70 The rest of the session is encrypted using a symmetric cipher, currently 68 The rest of the session is encrypted using a symmetric cipher, currently
71 128 bit AES, Blowfish, 3DES, CAST128, Arcfour, 192 bit AES, or 256 bit 69 128 bit AES, Blowfish, 3DES, CAST128, Arcfour, 192 bit AES, or 256 bit
72 AES. The client selects the encryption algorithm to use from those of- 70 AES. The client selects the encryption algorithm to use from those
73 fered by the server. Additionally, session integrity is provided through 71 offered by the server. Additionally, session integrity is provided
74 a cryptographic message authentication code (hmac-sha1 or hmac-md5). 72 through a cryptographic message authentication code (hmac-sha1 or hmac-
73 md5).
75 74
76 Protocol version 2 provides a public key based user (PubkeyAuthentica- 75 Protocol version 2 provides a public key based user (PubkeyAuthentica-
77 tion) or client host (HostbasedAuthentication) authentication method, 76 tion) or client host (HostbasedAuthentication) authentication method,
@@ -79,7 +78,6 @@ DESCRIPTION
79 ods. 78 ods.
80 79
81 Command execution and data forwarding 80 Command execution and data forwarding
82
83 If the client successfully authenticates itself, a dialog for preparing 81 If the client successfully authenticates itself, a dialog for preparing
84 the session is entered. At this time the client may request things like 82 the session is entered. At this time the client may request things like
85 allocating a pseudo-tty, forwarding X11 connections, forwarding TCP/IP 83 allocating a pseudo-tty, forwarding X11 connections, forwarding TCP/IP
@@ -112,8 +110,8 @@ DESCRIPTION
112 -d Debug mode. The server sends verbose debug output to the system 110 -d Debug mode. The server sends verbose debug output to the system
113 log, and does not put itself in the background. The server also 111 log, and does not put itself in the background. The server also
114 will not fork and will only process one connection. This option 112 will not fork and will only process one connection. This option
115 is only intended for debugging for the server. Multiple -d op- 113 is only intended for debugging for the server. Multiple -d
116 tions increase the debugging level. Maximum is 3. 114 options increase the debugging level. Maximum is 3.
117 115
118 -e When this option is specified, sshd will send the output to the 116 -e When this option is specified, sshd will send the output to the
119 standard error instead of the system log. 117 standard error instead of the system log.
@@ -124,10 +122,10 @@ DESCRIPTION
124 figuration file. 122 figuration file.
125 123
126 -g login_grace_time 124 -g login_grace_time
127 Gives the grace time for clients to authenticate themselves (de- 125 Gives the grace time for clients to authenticate themselves
128 fault 120 seconds). If the client fails to authenticate the user 126 (default 120 seconds). If the client fails to authenticate the
129 within this many seconds, the server disconnects and exits. A 127 user within this many seconds, the server disconnects and exits.
130 value of zero indicates no limit. 128 A value of zero indicates no limit.
131 129
132 -h host_key_file 130 -h host_key_file
133 Specifies a file from which a host key is read. This option must 131 Specifies a file from which a host key is read. This option must
@@ -141,9 +139,9 @@ DESCRIPTION
141 -i Specifies that sshd is being run from inetd(8). sshd is normally 139 -i Specifies that sshd is being run from inetd(8). sshd is normally
142 not run from inetd because it needs to generate the server key 140 not run from inetd because it needs to generate the server key
143 before it can respond to the client, and this may take tens of 141 before it can respond to the client, and this may take tens of
144 seconds. Clients would have to wait too long if the key was re- 142 seconds. Clients would have to wait too long if the key was
145 generated every time. However, with small key sizes (e.g., 512) 143 regenerated every time. However, with small key sizes (e.g.,
146 using sshd from inetd may be feasible. 144 512) using sshd from inetd may be feasible.
147 145
148 -k key_gen_time 146 -k key_gen_time
149 Specifies how often the ephemeral protocol version 1 server key 147 Specifies how often the ephemeral protocol version 1 server key
@@ -165,8 +163,8 @@ DESCRIPTION
165 fied in the configuration file are ignored when a command-line 163 fied in the configuration file are ignored when a command-line
166 port is specified. 164 port is specified.
167 165
168 -q Quiet mode. Nothing is sent to the system log. Normally the be- 166 -q Quiet mode. Nothing is sent to the system log. Normally the
169 ginning, authentication, and termination of each connection is 167 beginning, authentication, and termination of each connection is
170 logged. 168 logged.
171 169
172 -t Test mode. Only check the validity of the configuration file and 170 -t Test mode. Only check the validity of the configuration file and
@@ -181,10 +179,10 @@ DESCRIPTION
181 indicates that only dotted decimal addresses should be put into 179 indicates that only dotted decimal addresses should be put into
182 the utmp file. -u0 may also be used to prevent sshd from making 180 the utmp file. -u0 may also be used to prevent sshd from making
183 DNS requests unless the authentication mechanism or configuration 181 DNS requests unless the authentication mechanism or configuration
184 requires it. Authentication mechanisms that may require DNS in- 182 requires it. Authentication mechanisms that may require DNS
185 clude RhostsRSAAuthentication, HostbasedAuthentication and using 183 include RhostsRSAAuthentication, HostbasedAuthentication and
186 a from="pattern-list" option in a key file. Configuration op- 184 using a from="pattern-list" option in a key file. Configuration
187 tions that require DNS include using a USER@HOST pattern in 185 options that require DNS include using a USER@HOST pattern in
188 AllowUsers or DenyUsers. 186 AllowUsers or DenyUsers.
189 187
190 -D When this option is specified sshd will not detach and does not 188 -D When this option is specified sshd will not detach and does not
@@ -216,18 +214,18 @@ LOGIN PROCESS
216 214
217 5. Sets up basic environment. 215 5. Sets up basic environment.
218 216
219 6. Reads $HOME/.ssh/environment if it exists and users are al- 217 6. Reads $HOME/.ssh/environment if it exists and users are
220 lowed to change their environment. See the 218 allowed to change their environment. See the
221 PermitUserEnvironment option in sshd_config(5). 219 PermitUserEnvironment option in sshd_config(5).
222 220
223 7. Changes to user's home directory. 221 7. Changes to userM-bM-^@M-^Ys home directory.
224 222
225 8. If $HOME/.ssh/rc exists, runs it; else if /etc/ssh/sshrc ex- 223 8. If $HOME/.ssh/rc exists, runs it; else if /etc/ssh/sshrc
226 ists, runs it; otherwise runs xauth. The ``rc'' files are 224 exists, runs it; otherwise runs xauth. The M-bM-^@M-^\rcM-bM-^@M-^] files are
227 given the X11 authentication protocol and cookie in standard 225 given the X11 authentication protocol and cookie in standard
228 input. 226 input.
229 227
230 9. Runs user's shell or command. 228 9. Runs userM-bM-^@M-^Ys shell or command.
231 229
232AUTHORIZED_KEYS FILE FORMAT 230AUTHORIZED_KEYS FILE FORMAT
233 $HOME/.ssh/authorized_keys is the default file that lists the public keys 231 $HOME/.ssh/authorized_keys is the default file that lists the public keys
@@ -236,7 +234,7 @@ AUTHORIZED_KEYS FILE FORMAT
236 AuthorizedKeysFile may be used to specify an alternative file. 234 AuthorizedKeysFile may be used to specify an alternative file.
237 235
238 Each line of the file contains one key (empty lines and lines starting 236 Each line of the file contains one key (empty lines and lines starting
239 with a `#' are ignored as comments). Each RSA public key consists of the 237 with a M-bM-^@M-^X#M-bM-^@M-^Y are ignored as comments). Each RSA public key consists of the
240 following fields, separated by spaces: options, bits, exponent, modulus, 238 following fields, separated by spaces: options, bits, exponent, modulus,
241 comment. Each protocol version 2 public key consists of: options, key- 239 comment. Each protocol version 2 public key consists of: options, key-
242 type, base64 encoded key, comment. The options field is optional; its 240 type, base64 encoded key, comment. The options field is optional; its
@@ -244,11 +242,11 @@ AUTHORIZED_KEYS FILE FORMAT
244 (the options field never starts with a number). The bits, exponent, mod- 242 (the options field never starts with a number). The bits, exponent, mod-
245 ulus and comment fields give the RSA key for protocol version 1; the com- 243 ulus and comment fields give the RSA key for protocol version 1; the com-
246 ment field is not used for anything (but may be convenient for the user 244 ment field is not used for anything (but may be convenient for the user
247 to identify the key). For protocol version 2 the keytype is ``ssh-dss'' 245 to identify the key). For protocol version 2 the keytype is M-bM-^@M-^\ssh-dssM-bM-^@M-^] or
248 or ``ssh-rsa''. 246 M-bM-^@M-^\ssh-rsaM-bM-^@M-^].
249 247
250 Note that lines in this file are usually several hundred bytes long (be- 248 Note that lines in this file are usually several hundred bytes long
251 cause of the size of the public key encoding). You don't want to type 249 (because of the size of the public key encoding). You donM-bM-^@M-^Yt want to type
252 them in; instead, copy the identity.pub, id_dsa.pub or the id_rsa.pub 250 them in; instead, copy the identity.pub, id_dsa.pub or the id_rsa.pub
253 file and edit it. 251 file and edit it.
254 252
@@ -263,31 +261,31 @@ AUTHORIZED_KEYS FILE FORMAT
263 from="pattern-list" 261 from="pattern-list"
264 Specifies that in addition to public key authentication, the 262 Specifies that in addition to public key authentication, the
265 canonical name of the remote host must be present in the comma- 263 canonical name of the remote host must be present in the comma-
266 separated list of patterns (`*' and `?' serve as wildcards). The 264 separated list of patterns (M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y serve as wildcards). The
267 list may also contain patterns negated by prefixing them with 265 list may also contain patterns negated by prefixing them with
268 `!'; if the canonical host name matches a negated pattern, the 266 M-bM-^@M-^X!M-bM-^@M-^Y; if the canonical host name matches a negated pattern, the
269 key is not accepted. The purpose of this option is to optionally 267 key is not accepted. The purpose of this option is to optionally
270 increase security: public key authentication by itself does not 268 increase security: public key authentication by itself does not
271 trust the network or name servers or anything (but the key); how- 269 trust the network or name servers or anything (but the key); how-
272 ever, if somebody somehow steals the key, the key permits an in- 270 ever, if somebody somehow steals the key, the key permits an
273 truder to log in from anywhere in the world. This additional op- 271 intruder to log in from anywhere in the world. This additional
274 tion makes using a stolen key more difficult (name servers and/or 272 option makes using a stolen key more difficult (name servers
275 routers would have to be compromised in addition to just the 273 and/or routers would have to be compromised in addition to just
276 key). 274 the key).
277 275
278 command="command" 276 command="command"
279 Specifies that the command is executed whenever this key is used 277 Specifies that the command is executed whenever this key is used
280 for authentication. The command supplied by the user (if any) is 278 for authentication. The command supplied by the user (if any) is
281 ignored. The command is run on a pty if the client requests a 279 ignored. The command is run on a pty if the client requests a
282 pty; otherwise it is run without a tty. If an 8-bit clean chan- 280 pty; otherwise it is run without a tty. If an 8-bit clean chan-
283 nel is required, one must not request a pty or should specify no- 281 nel is required, one must not request a pty or should specify
284 pty. A quote may be included in the command by quoting it with a 282 no-pty. A quote may be included in the command by quoting it
285 backslash. This option might be useful to restrict certain pub- 283 with a backslash. This option might be useful to restrict cer-
286 lic keys to perform just a specific operation. An example might 284 tain public keys to perform just a specific operation. An exam-
287 be a key that permits remote backups but nothing else. Note that 285 ple might be a key that permits remote backups but nothing else.
288 the client may specify TCP/IP and/or X11 forwarding unless they 286 Note that the client may specify TCP/IP and/or X11 forwarding
289 are explicitly prohibited. Note that this option applies to 287 unless they are explicitly prohibited. Note that this option
290 shell, command or subsystem execution. 288 applies to shell, command or subsystem execution.
291 289
292 environment="NAME=value" 290 environment="NAME=value"
293 Specifies that the string is to be added to the environment when 291 Specifies that the string is to be added to the environment when
@@ -299,8 +297,8 @@ AUTHORIZED_KEYS FILE FORMAT
299 297
300 no-port-forwarding 298 no-port-forwarding
301 Forbids TCP/IP forwarding when this key is used for authentica- 299 Forbids TCP/IP forwarding when this key is used for authentica-
302 tion. Any port forward requests by the client will return an er- 300 tion. Any port forward requests by the client will return an
303 ror. This might be used, e.g., in connection with the command 301 error. This might be used, e.g., in connection with the command
304 option. 302 option.
305 303
306 no-X11-forwarding 304 no-X11-forwarding
@@ -314,45 +312,45 @@ AUTHORIZED_KEYS FILE FORMAT
314 no-pty Prevents tty allocation (a request to allocate a pty will fail). 312 no-pty Prevents tty allocation (a request to allocate a pty will fail).
315 313
316 permitopen="host:port" 314 permitopen="host:port"
317 Limit local ``ssh -L'' port forwarding such that it may only con- 315 Limit local M-bM-^@M-^XM-bM-^@M-^Xssh -LM-bM-^@M-^YM-bM-^@M-^Y port forwarding such that it may only con-
318 nect to the specified host and port. IPv6 addresses can be spec- 316 nect to the specified host and port. IPv6 addresses can be spec-
319 ified with an alternative syntax: host/port. Multiple permitopen 317 ified with an alternative syntax: host/port. Multiple permitopen
320 options may be applied separated by commas. No pattern matching 318 options may be applied separated by commas. No pattern matching
321 is performed on the specified hostnames, they must be literal do- 319 is performed on the specified hostnames, they must be literal
322 mains or addresses. 320 domains or addresses.
323 321
324 Examples 322 Examples
325 1024 33 12121...312314325 ylo@foo.bar 323 1024 33 12121...312314325 ylo@foo.bar
326 324
327 from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23...2334 ylo@niksula 325 from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23...2334 ylo@niksula
328 326
329 command="dump /home",no-pty,no-port-forwarding 1024 33 23...2323 back- 327 command="dump /home",no-pty,no-port-forwarding 1024 33 23...2323
330 up.hut.fi 328 backup.hut.fi
331 329
332 permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23...2323 330 permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23...2323
333 331
334SSH_KNOWN_HOSTS FILE FORMAT 332SSH_KNOWN_HOSTS FILE FORMAT
335 The /etc/ssh/ssh_known_hosts and $HOME/.ssh/known_hosts files contain 333 The /etc/ssh/ssh_known_hosts and $HOME/.ssh/known_hosts files contain
336 host public keys for all known hosts. The global file should be prepared 334 host public keys for all known hosts. The global file should be prepared
337 by the administrator (optional), and the per-user file is maintained au- 335 by the administrator (optional), and the per-user file is maintained
338 tomatically: whenever the user connects from an unknown host its key is 336 automatically: whenever the user connects from an unknown host its key is
339 added to the per-user file. 337 added to the per-user file.
340 338
341 Each line in these files contains the following fields: hostnames, bits, 339 Each line in these files contains the following fields: hostnames, bits,
342 exponent, modulus, comment. The fields are separated by spaces. 340 exponent, modulus, comment. The fields are separated by spaces.
343 341
344 Hostnames is a comma-separated list of patterns (`*' and `?' act as wild- 342 Hostnames is a comma-separated list of patterns (M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y act as wild-
345 cards); each pattern in turn is matched against the canonical host name 343 cards); each pattern in turn is matched against the canonical host name
346 (when authenticating a client) or against the user-supplied name (when 344 (when authenticating a client) or against the user-supplied name (when
347 authenticating a server). A pattern may also be preceded by `!' to indi- 345 authenticating a server). A pattern may also be preceded by M-bM-^@M-^X!M-bM-^@M-^Y to indi-
348 cate negation: if the host name matches a negated pattern, it is not ac- 346 cate negation: if the host name matches a negated pattern, it is not
349 cepted (by that line) even if it matched another pattern on the line. 347 accepted (by that line) even if it matched another pattern on the line.
350 348
351 Bits, exponent, and modulus are taken directly from the RSA host key; 349 Bits, exponent, and modulus are taken directly from the RSA host key;
352 they can be obtained, e.g., from /etc/ssh/ssh_host_key.pub. The optional 350 they can be obtained, e.g., from /etc/ssh/ssh_host_key.pub. The optional
353 comment field continues to the end of the line, and is not used. 351 comment field continues to the end of the line, and is not used.
354 352
355 Lines starting with `#' and empty lines are ignored as comments. 353 Lines starting with M-bM-^@M-^X#M-bM-^@M-^Y and empty lines are ignored as comments.
356 354
357 When performing host authentication, authentication is accepted if any 355 When performing host authentication, authentication is accepted if any
358 matching line has the proper key. It is thus permissible (but not recom- 356 matching line has the proper key. It is thus permissible (but not recom-
@@ -363,12 +361,11 @@ SSH_KNOWN_HOSTS FILE FORMAT
363 be found from either file. 361 be found from either file.
364 362
365 Note that the lines in these files are typically hundreds of characters 363 Note that the lines in these files are typically hundreds of characters
366 long, and you definitely don't want to type in the host keys by hand. 364 long, and you definitely donM-bM-^@M-^Yt want to type in the host keys by hand.
367 Rather, generate them by a script or by taking /etc/ssh/ssh_host_key.pub 365 Rather, generate them by a script or by taking /etc/ssh/ssh_host_key.pub
368 and adding the host names at the front. 366 and adding the host names at the front.
369 367
370 Examples 368 Examples
371
372 closenet,...,130.233.208.41 1024 37 159...93 closenet.hut.fi 369 closenet,...,130.233.208.41 1024 37 159...93 closenet.hut.fi
373 cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....= 370 cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....=
374 371
@@ -412,11 +409,11 @@ FILES
412 409
413 $HOME/.ssh/authorized_keys 410 $HOME/.ssh/authorized_keys
414 Lists the public keys (RSA or DSA) that can be used to log into 411 Lists the public keys (RSA or DSA) that can be used to log into
415 the user's account. This file must be readable by root (which 412 the userM-bM-^@M-^Ys account. This file must be readable by root (which
416 may on some machines imply it being world-readable if the user's 413 may on some machines imply it being world-readable if the userM-bM-^@M-^Ys
417 home directory resides on an NFS volume). It is recommended that 414 home directory resides on an NFS volume). It is recommended that
418 it not be accessible by others. The format of this file is de- 415 it not be accessible by others. The format of this file is
419 scribed above. Users will place the contents of their 416 described above. Users will place the contents of their
420 identity.pub, id_dsa.pub and/or id_rsa.pub files into this file, 417 identity.pub, id_dsa.pub and/or id_rsa.pub files into this file,
421 as described in ssh-keygen(1). 418 as described in ssh-keygen(1).
422 419
@@ -437,8 +434,8 @@ FILES
437 world-readable. 434 world-readable.
438 435
439 /etc/hosts.allow, /etc/hosts.deny 436 /etc/hosts.allow, /etc/hosts.deny
440 Access controls that should be enforced by tcp-wrappers are de- 437 Access controls that should be enforced by tcp-wrappers are
441 fined here. Further details are described in hosts_access(5). 438 defined here. Further details are described in hosts_access(5).
442 439
443 $HOME/.rhosts 440 $HOME/.rhosts
444 This file contains host-username pairs, separated by a space, one 441 This file contains host-username pairs, separated by a space, one
@@ -463,21 +460,22 @@ FILES
463 they have the same user name on both machines. The host name may 460 they have the same user name on both machines. The host name may
464 also be followed by a user name; such users are permitted to log 461 also be followed by a user name; such users are permitted to log
465 in as any user on this machine (except root). Additionally, the 462 in as any user on this machine (except root). Additionally, the
466 syntax ``+@group'' can be used to specify netgroups. Negated en- 463 syntax M-bM-^@M-^\+@groupM-bM-^@M-^] can be used to specify netgroups. Negated
467 tries start with `-'. 464 entries start with M-bM-^@M-^X-M-bM-^@M-^Y.
468 465
469 If the client host/user is successfully matched in this file, lo- 466 If the client host/user is successfully matched in this file,
470 gin is automatically permitted provided the client and server us- 467 login is automatically permitted provided the client and server
471 er names are the same. Additionally, successful RSA host authen- 468 user names are the same. Additionally, successful RSA host
472 tication is normally required. This file must be writable only 469 authentication is normally required. This file must be writable
473 by root; it is recommended that it be world-readable. 470 only by root; it is recommended that it be world-readable.
474 471
475 Warning: It is almost never a good idea to use user names in 472 Warning: It is almost never a good idea to use user names in
476 hosts.equiv. Beware that it really means that the named user(s) 473 hosts.equiv. Beware that it really means that the named user(s)
477 can log in as anybody, which includes bin, daemon, adm, and other 474 can log in as anybody, which includes bin, daemon, adm, and other
478 accounts that own critical binaries and directories. Using a us- 475 accounts that own critical binaries and directories. Using a
479 er name practically grants the user root access. The only valid 476 user name practically grants the user root access. The only
480 use for user names that I can think of is in negative entries. 477 valid use for user names that I can think of is in negative
478 entries.
481 479
482 Note that this warning also applies to rsh/rlogin. 480 Note that this warning also applies to rsh/rlogin.
483 481
@@ -489,33 +487,33 @@ FILES
489 $HOME/.ssh/environment 487 $HOME/.ssh/environment
490 This file is read into the environment at login (if it exists). 488 This file is read into the environment at login (if it exists).
491 It can only contain empty lines, comment lines (that start with 489 It can only contain empty lines, comment lines (that start with
492 `#'), and assignment lines of the form name=value. The file 490 M-bM-^@M-^X#M-bM-^@M-^Y), and assignment lines of the form name=value. The file
493 should be writable only by the user; it need not be readable by 491 should be writable only by the user; it need not be readable by
494 anyone else. Environment processing is disabled by default and 492 anyone else. Environment processing is disabled by default and
495 is controlled via the PermitUserEnvironment option. 493 is controlled via the PermitUserEnvironment option.
496 494
497 $HOME/.ssh/rc 495 $HOME/.ssh/rc
498 If this file exists, it is run with /bin/sh after reading the en- 496 If this file exists, it is run with /bin/sh after reading the
499 vironment files but before starting the user's shell or command. 497 environment files but before starting the userM-bM-^@M-^Ys shell or com-
500 It must not produce any output on stdout; stderr must be used in- 498 mand. It must not produce any output on stdout; stderr must be
501 stead. If X11 forwarding is in use, it will receive the "proto 499 used instead. If X11 forwarding is in use, it will receive the
502 cookie" pair in its standard input (and DISPLAY in its environ- 500 "proto cookie" pair in its standard input (and DISPLAY in its
503 ment). The script must call xauth(1) because sshd will not run 501 environment). The script must call xauth(1) because sshd will
504 xauth automatically to add X11 cookies. 502 not run xauth automatically to add X11 cookies.
505 503
506 The primary purpose of this file is to run any initialization 504 The primary purpose of this file is to run any initialization
507 routines which may be needed before the user's home directory be- 505 routines which may be needed before the userM-bM-^@M-^Ys home directory
508 comes accessible; AFS is a particular example of such an environ- 506 becomes accessible; AFS is a particular example of such an envi-
509 ment. 507 ronment.
510 508
511 This file will probably contain some initialization code followed 509 This file will probably contain some initialization code followed
512 by something similar to: 510 by something similar to:
513 511
514 if read proto cookie && [ -n "$DISPLAY" ]; then 512 if read proto cookie && [ -n "$DISPLAY" ]; then
515 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then 513 if [ M-bM-^@M-^Xecho $DISPLAY | cut -c1-10M-bM-^@M-^X = M-bM-^@M-^Ylocalhost:M-bM-^@M-^Y ]; then
516 # X11UseLocalhost=yes 514 # X11UseLocalhost=yes
517 echo add unix:`echo $DISPLAY | 515 echo add unix:M-bM-^@M-^Xecho $DISPLAY |
518 cut -c11-` $proto $cookie 516 cut -c11-M-bM-^@M-^X $proto $cookie
519 else 517 else
520 # X11UseLocalhost=no 518 # X11UseLocalhost=no
521 echo add $DISPLAY $proto $cookie 519 echo add $DISPLAY $proto $cookie
@@ -548,9 +546,9 @@ SEE ALSO
548AUTHORS 546AUTHORS
549 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 547 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
550 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo 548 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
551 de Raadt and Dug Song removed many bugs, re-added newer features and 549 de Raadt and Dug Song removed many bugs, re-added newer features and cre-
552 created OpenSSH. Markus Friedl contributed the support for SSH protocol 550 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
553 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support 551 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
554 for privilege separation. 552 for privilege separation.
555 553
556OpenBSD 3.4 September 25, 1999 9 554BSD September 25, 1999 BSD