summaryrefslogtreecommitdiff
path: root/sshd.0
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.0')
-rw-r--r--sshd.0665
1 files changed, 665 insertions, 0 deletions
diff --git a/sshd.0 b/sshd.0
new file mode 100644
index 000000000..0f7db5fc3
--- /dev/null
+++ b/sshd.0
@@ -0,0 +1,665 @@
1SSHD(8) System Manager's Manual SSHD(8)
2
3NAME
4 sshd M-bM-^@M-^S OpenSSH SSH daemon
5
6SYNOPSIS
7 sshd [-46DdeiqTt] [-b bits] [-C connection_spec]
8 [-c host_certificate_file] [-E log_file] [-f config_file]
9 [-g login_grace_time] [-h host_key_file] [-k key_gen_time]
10 [-o option] [-p port] [-u len]
11
12DESCRIPTION
13 sshd (OpenSSH Daemon) is the daemon program for ssh(1). Together these
14 programs replace rlogin and rsh, and provide secure encrypted
15 communications between two untrusted hosts over an insecure network.
16
17 sshd listens for connections from clients. It is normally started at
18 boot from /etc/rc. It forks a new daemon for each incoming connection.
19 The forked daemons handle key exchange, encryption, authentication,
20 command execution, and data exchange.
21
22 sshd can be configured using command-line options or a configuration file
23 (by default sshd_config(5)); command-line options override values
24 specified in the configuration file. sshd rereads its configuration file
25 when it receives a hangup signal, SIGHUP, by executing itself with the
26 name and options it was started with, e.g. /usr/sbin/sshd.
27
28 The options are as follows:
29
30 -4 Forces sshd to use IPv4 addresses only.
31
32 -6 Forces sshd to use IPv6 addresses only.
33
34 -b bits
35 Specifies the number of bits in the ephemeral protocol version 1
36 server key (default 1024).
37
38 -C connection_spec
39 Specify the connection parameters to use for the -T extended test
40 mode. If provided, any Match directives in the configuration
41 file that would apply to the specified user, host, and address
42 will be set before the configuration is written to standard
43 output. The connection parameters are supplied as keyword=value
44 pairs. The keywords are M-bM-^@M-^\userM-bM-^@M-^], M-bM-^@M-^\hostM-bM-^@M-^], M-bM-^@M-^\laddrM-bM-^@M-^], M-bM-^@M-^\lportM-bM-^@M-^], and
45 M-bM-^@M-^\addrM-bM-^@M-^]. All are required and may be supplied in any order,
46 either with multiple -C options or as a comma-separated list.
47
48 -c host_certificate_file
49 Specifies a path to a certificate file to identify sshd during
50 key exchange. The certificate file must match a host key file
51 specified using the -h option or the HostKey configuration
52 directive.
53
54 -D When this option is specified, sshd will not detach and does not
55 become a daemon. This allows easy monitoring of sshd.
56
57 -d Debug mode. The server sends verbose debug output to standard
58 error, and does not put itself in the background. The server
59 also will not fork and will only process one connection. This
60 option is only intended for debugging for the server. Multiple
61 -d options increase the debugging level. Maximum is 3.
62
63 -E log_file
64 Append debug logs to log_file instead of the system log.
65
66 -e Write debug logs to standard error instead of the system log.
67
68 -f config_file
69 Specifies the name of the configuration file. The default is
70 /etc/ssh/sshd_config. sshd refuses to start if there is no
71 configuration file.
72
73 -g login_grace_time
74 Gives the grace time for clients to authenticate themselves
75 (default 120 seconds). If the client fails to authenticate the
76 user within this many seconds, the server disconnects and exits.
77 A value of zero indicates no limit.
78
79 -h host_key_file
80 Specifies a file from which a host key is read. This option must
81 be given if sshd is not run as root (as the normal host key files
82 are normally not readable by anyone but root). The default is
83 /etc/ssh/ssh_host_key for protocol version 1, and
84 /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key.
85 /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
86 protocol version 2. It is possible to have multiple host key
87 files for the different protocol versions and host key
88 algorithms.
89
90 -i Specifies that sshd is being run from inetd(8). If SSH protocol
91 1 is enabled, sshd should not normally be run from inetd because
92 it needs to generate the server key before it can respond to the
93 client, and this may take some time. Clients may have to wait
94 too long if the key was regenerated every time.
95
96 -k key_gen_time
97 Specifies how often the ephemeral protocol version 1 server key
98 is regenerated (default 3600 seconds, or one hour). The
99 motivation for regenerating the key fairly often is that the key
100 is not stored anywhere, and after about an hour it becomes
101 impossible to recover the key for decrypting intercepted
102 communications even if the machine is cracked into or physically
103 seized. A value of zero indicates that the key will never be
104 regenerated.
105
106 -o option
107 Can be used to give options in the format used in the
108 configuration file. This is useful for specifying options for
109 which there is no separate command-line flag. For full details
110 of the options, and their values, see sshd_config(5).
111
112 -p port
113 Specifies the port on which the server listens for connections
114 (default 22). Multiple port options are permitted. Ports
115 specified in the configuration file with the Port option are
116 ignored when a command-line port is specified. Ports specified
117 using the ListenAddress option override command-line ports.
118
119 -q Quiet mode. Nothing is sent to the system log. Normally the
120 beginning, authentication, and termination of each connection is
121 logged.
122
123 -T Extended test mode. Check the validity of the configuration
124 file, output the effective configuration to stdout and then exit.
125 Optionally, Match rules may be applied by specifying the
126 connection parameters using one or more -C options.
127
128 -t Test mode. Only check the validity of the configuration file and
129 sanity of the keys. This is useful for updating sshd reliably as
130 configuration options may change.
131
132 -u len This option is used to specify the size of the field in the utmp
133 structure that holds the remote host name. If the resolved host
134 name is longer than len, the dotted decimal value will be used
135 instead. This allows hosts with very long host names that
136 overflow this field to still be uniquely identified. Specifying
137 -u0 indicates that only dotted decimal addresses should be put
138 into the utmp file. -u0 may also be used to prevent sshd from
139 making DNS requests unless the authentication mechanism or
140 configuration requires it. Authentication mechanisms that may
141 require DNS include RhostsRSAAuthentication,
142 HostbasedAuthentication, and using a from="pattern-list" option
143 in a key file. Configuration options that require DNS include
144 using a USER@HOST pattern in AllowUsers or DenyUsers.
145
146AUTHENTICATION
147 The OpenSSH SSH daemon supports SSH protocols 1 and 2. The default is to
148 use protocol 2 only, though this can be changed via the Protocol option
149 in sshd_config(5). Protocol 1 should not be used and is only offered to
150 support legacy devices.
151
152 Each host has a host-specific key, used to identify the host. Partial
153 forward security for protocol 1 is provided through an additional server
154 key, normally 1024 bits, generated when the server starts. This key is
155 normally regenerated every hour if it has been used, and is never stored
156 on disk. Whenever a client connects, the daemon responds with its public
157 host and server keys. The client compares the RSA host key against its
158 own database to verify that it has not changed. The client then
159 generates a 256-bit random number. It encrypts this random number using
160 both the host key and the server key, and sends the encrypted number to
161 the server. Both sides then use this random number as a session key
162 which is used to encrypt all further communications in the session. The
163 rest of the session is encrypted using a conventional cipher, currently
164 Blowfish or 3DES, with 3DES being used by default. The client selects
165 the encryption algorithm to use from those offered by the server.
166
167 For protocol 2, forward security is provided through a Diffie-Hellman key
168 agreement. This key agreement results in a shared session key. The rest
169 of the session is encrypted using a symmetric cipher, currently 128-bit
170 AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES. The
171 client selects the encryption algorithm to use from those offered by the
172 server. Additionally, session integrity is provided through a
173 cryptographic message authentication code (hmac-md5, hmac-sha1, umac-64,
174 umac-128, hmac-ripemd160, hmac-sha2-256 or hmac-sha2-512).
175
176 Finally, the server and the client enter an authentication dialog. The
177 client tries to authenticate itself using host-based authentication,
178 public key authentication, challenge-response authentication, or password
179 authentication.
180
181 Regardless of the authentication type, the account is checked to ensure
182 that it is accessible. An account is not accessible if it is locked,
183 listed in DenyUsers or its group is listed in DenyGroups . The
184 definition of a locked account is system dependant. Some platforms have
185 their own account database (eg AIX) and some modify the passwd field (
186 M-bM-^@M-^X*LK*M-bM-^@M-^Y on Solaris and UnixWare, M-bM-^@M-^X*M-bM-^@M-^Y on HP-UX, containing M-bM-^@M-^XNologinM-bM-^@M-^Y on
187 Tru64, a leading M-bM-^@M-^X*LOCKED*M-bM-^@M-^Y on FreeBSD and a leading M-bM-^@M-^X!M-bM-^@M-^Y on most
188 Linuxes). If there is a requirement to disable password authentication
189 for the account while allowing still public-key, then the passwd field
190 should be set to something other than these values (eg M-bM-^@M-^XNPM-bM-^@M-^Y or M-bM-^@M-^X*NP*M-bM-^@M-^Y ).
191
192 If the client successfully authenticates itself, a dialog for preparing
193 the session is entered. At this time the client may request things like
194 allocating a pseudo-tty, forwarding X11 connections, forwarding TCP
195 connections, or forwarding the authentication agent connection over the
196 secure channel.
197
198 After this, the client either requests a shell or execution of a command.
199 The sides then enter session mode. In this mode, either side may send
200 data at any time, and such data is forwarded to/from the shell or command
201 on the server side, and the user terminal in the client side.
202
203 When the user program terminates and all forwarded X11 and other
204 connections have been closed, the server sends command exit status to the
205 client, and both sides exit.
206
207LOGIN PROCESS
208 When a user successfully logs in, sshd does the following:
209
210 1. If the login is on a tty, and no command has been specified,
211 prints last login time and /etc/motd (unless prevented in the
212 configuration file or by ~/.hushlogin; see the FILES section).
213
214 2. If the login is on a tty, records login time.
215
216 3. Checks /etc/nologin; if it exists, prints contents and quits
217 (unless root).
218
219 4. Changes to run with normal user privileges.
220
221 5. Sets up basic environment.
222
223 6. Reads the file ~/.ssh/environment, if it exists, and users are
224 allowed to change their environment. See the
225 PermitUserEnvironment option in sshd_config(5).
226
227 7. Changes to user's home directory.
228
229 8. If ~/.ssh/rc exists and the sshd_config(5) PermitUserRC option
230 is set, runs it; else if /etc/ssh/sshrc exists, runs it;
231 otherwise runs xauth. The M-bM-^@M-^\rcM-bM-^@M-^] files are given the X11
232 authentication protocol and cookie in standard input. See
233 SSHRC, below.
234
235 9. Runs user's shell or command. All commands are run under the
236 user's login shell as specified in the system password
237 database.
238
239SSHRC
240 If the file ~/.ssh/rc exists, sh(1) runs it after reading the environment
241 files but before starting the user's shell or command. It must not
242 produce any output on stdout; stderr must be used instead. If X11
243 forwarding is in use, it will receive the "proto cookie" pair in its
244 standard input (and DISPLAY in its environment). The script must call
245 xauth(1) because sshd will not run xauth automatically to add X11
246 cookies.
247
248 The primary purpose of this file is to run any initialization routines
249 which may be needed before the user's home directory becomes accessible;
250 AFS is a particular example of such an environment.
251
252 This file will probably contain some initialization code followed by
253 something similar to:
254
255 if read proto cookie && [ -n "$DISPLAY" ]; then
256 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
257 # X11UseLocalhost=yes
258 echo add unix:`echo $DISPLAY |
259 cut -c11-` $proto $cookie
260 else
261 # X11UseLocalhost=no
262 echo add $DISPLAY $proto $cookie
263 fi | xauth -q -
264 fi
265
266 If this file does not exist, /etc/ssh/sshrc is run, and if that does not
267 exist either, xauth is used to add the cookie.
268
269AUTHORIZED_KEYS FILE FORMAT
270 AuthorizedKeysFile specifies the files containing public keys for public
271 key authentication; if this option is not specified, the default is
272 ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2. Each line of the
273 file contains one key (empty lines and lines starting with a M-bM-^@M-^X#M-bM-^@M-^Y are
274 ignored as comments). Protocol 1 public keys consist of the following
275 space-separated fields: options, bits, exponent, modulus, comment.
276 Protocol 2 public key consist of: options, keytype, base64-encoded key,
277 comment. The options field is optional; its presence is determined by
278 whether the line starts with a number or not (the options field never
279 starts with a number). The bits, exponent, modulus, and comment fields
280 give the RSA key for protocol version 1; the comment field is not used
281 for anything (but may be convenient for the user to identify the key).
282 For protocol version 2 the keytype is M-bM-^@M-^\ecdsa-sha2-nistp256M-bM-^@M-^],
283 M-bM-^@M-^\ecdsa-sha2-nistp384M-bM-^@M-^], M-bM-^@M-^\ecdsa-sha2-nistp521M-bM-^@M-^], M-bM-^@M-^\ssh-ed25519M-bM-^@M-^], M-bM-^@M-^\ssh-dssM-bM-^@M-^] or
284 M-bM-^@M-^\ssh-rsaM-bM-^@M-^].
285
286 Note that lines in this file are usually several hundred bytes long
287 (because of the size of the public key encoding) up to a limit of 8
288 kilobytes, which permits DSA keys up to 8 kilobits and RSA keys up to 16
289 kilobits. You don't want to type them in; instead, copy the
290 identity.pub, id_dsa.pub, id_ecdsa.pub, id_ed25519.pub, or the id_rsa.pub
291 file and edit it.
292
293 sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
294 2 keys of 768 bits.
295
296 The options (if present) consist of comma-separated option
297 specifications. No spaces are permitted, except within double quotes.
298 The following option specifications are supported (note that option
299 keywords are case-insensitive):
300
301 agent-forwarding
302 Enable authentication agent forwarding previously disabled by the
303 restrict option.
304
305 cert-authority
306 Specifies that the listed key is a certification authority (CA)
307 that is trusted to validate signed certificates for user
308 authentication.
309
310 Certificates may encode access restrictions similar to these key
311 options. If both certificate restrictions and key options are
312 present, the most restrictive union of the two is applied.
313
314 command="command"
315 Specifies that the command is executed whenever this key is used
316 for authentication. The command supplied by the user (if any) is
317 ignored. The command is run on a pty if the client requests a
318 pty; otherwise it is run without a tty. If an 8-bit clean
319 channel is required, one must not request a pty or should specify
320 no-pty. A quote may be included in the command by quoting it
321 with a backslash. This option might be useful to restrict
322 certain public keys to perform just a specific operation. An
323 example might be a key that permits remote backups but nothing
324 else. Note that the client may specify TCP and/or X11 forwarding
325 unless they are explicitly prohibited. The command originally
326 supplied by the client is available in the SSH_ORIGINAL_COMMAND
327 environment variable. Note that this option applies to shell,
328 command or subsystem execution. Also note that this command may
329 be superseded by either a sshd_config(5) ForceCommand directive
330 or a command embedded in a certificate.
331
332 environment="NAME=value"
333 Specifies that the string is to be added to the environment when
334 logging in using this key. Environment variables set this way
335 override other default environment values. Multiple options of
336 this type are permitted. Environment processing is disabled by
337 default and is controlled via the PermitUserEnvironment option.
338 This option is automatically disabled if UseLogin is enabled.
339
340 from="pattern-list"
341 Specifies that in addition to public key authentication, either
342 the canonical name of the remote host or its IP address must be
343 present in the comma-separated list of patterns. See PATTERNS in
344 ssh_config(5) for more information on patterns.
345
346 In addition to the wildcard matching that may be applied to
347 hostnames or addresses, a from stanza may match IP addresses
348 using CIDR address/masklen notation.
349
350 The purpose of this option is to optionally increase security:
351 public key authentication by itself does not trust the network or
352 name servers or anything (but the key); however, if somebody
353 somehow steals the key, the key permits an intruder to log in
354 from anywhere in the world. This additional option makes using a
355 stolen key more difficult (name servers and/or routers would have
356 to be compromised in addition to just the key).
357
358 no-agent-forwarding
359 Forbids authentication agent forwarding when this key is used for
360 authentication.
361
362 no-port-forwarding
363 Forbids TCP forwarding when this key is used for authentication.
364 Any port forward requests by the client will return an error.
365 This might be used, e.g. in connection with the command option.
366
367 no-pty Prevents tty allocation (a request to allocate a pty will fail).
368
369 no-user-rc
370 Disables execution of ~/.ssh/rc.
371
372 no-X11-forwarding
373 Forbids X11 forwarding when this key is used for authentication.
374 Any X11 forward requests by the client will return an error.
375
376 permitopen="host:port"
377 Limit local port forwarding with ssh(1) -L such that it may only
378 connect to the specified host and port. IPv6 addresses can be
379 specified by enclosing the address in square brackets. Multiple
380 permitopen options may be applied separated by commas. No
381 pattern matching is performed on the specified hostnames, they
382 must be literal domains or addresses. A port specification of *
383 matches any port.
384
385 port-forwarding
386 Enable port forwarding previously disabled by the restrict
387
388 principals="principals"
389 On a cert-authority line, specifies allowed principals for
390 certificate authentication as a comma-separated list. At least
391 one name from the list must appear in the certificate's list of
392 principals for the certificate to be accepted. This option is
393 ignored for keys that are not marked as trusted certificate
394 signers using the cert-authority option.
395
396 pty Permits tty allocation previously disabled by the restrict
397 option.
398
399 restrict
400 Enable all restrictions, i.e. disable port, agent and X11
401 forwarding, as well as disabling PTY allocation and execution of
402 ~/.ssh/rc. If any future restriction capabilities are added to
403 authorized_keys files they will be included in this set.
404
405 tunnel="n"
406 Force a tun(4) device on the server. Without this option, the
407 next available device will be used if the client requests a
408 tunnel.
409
410 user-rc
411 Enables execution of ~/.ssh/rc previously disabled by the
412 restrict option.
413
414 X11-forwarding
415 Permits X11 forwarding previously disabled by the restrict
416 option.
417
418 An example authorized_keys file:
419
420 # Comments allowed at start of line
421 ssh-rsa AAAAB3Nza...LiPk== user@example.net
422 from="*.sales.example.net,!pc.sales.example.net" ssh-rsa
423 AAAAB2...19Q== john@example.net
424 command="dump /home",no-pty,no-port-forwarding ssh-dss
425 AAAAC3...51R== example.net
426 permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss
427 AAAAB5...21S==
428 tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...==
429 jane@example.net
430 restrict,command="uptime" ssh-rsa AAAA1C8...32Tv==
431 user@example.net
432 restrict,pty,command="nethack" ssh-rsa AAAA1f8...IrrC5==
433 user@example.net
434
435SSH_KNOWN_HOSTS FILE FORMAT
436 The /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts files contain host
437 public keys for all known hosts. The global file should be prepared by
438 the administrator (optional), and the per-user file is maintained
439 automatically: whenever the user connects from an unknown host, its key
440 is added to the per-user file.
441
442 Each line in these files contains the following fields: markers
443 (optional), hostnames, bits, exponent, modulus, comment. The fields are
444 separated by spaces.
445
446 The marker is optional, but if it is present then it must be one of
447 M-bM-^@M-^\@cert-authorityM-bM-^@M-^], to indicate that the line contains a certification
448 authority (CA) key, or M-bM-^@M-^\@revokedM-bM-^@M-^], to indicate that the key contained on
449 the line is revoked and must not ever be accepted. Only one marker
450 should be used on a key line.
451
452 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
453 wildcards); each pattern in turn is matched against the canonical host
454 name (when authenticating a client) or against the user-supplied name
455 (when authenticating a server). A pattern may also be preceded by M-bM-^@M-^X!M-bM-^@M-^Y to
456 indicate negation: if the host name matches a negated pattern, it is not
457 accepted (by that line) even if it matched another pattern on the line.
458 A hostname or address may optionally be enclosed within M-bM-^@M-^X[M-bM-^@M-^Y and M-bM-^@M-^X]M-bM-^@M-^Y
459 brackets then followed by M-bM-^@M-^X:M-bM-^@M-^Y and a non-standard port number.
460
461 Alternately, hostnames may be stored in a hashed form which hides host
462 names and addresses should the file's contents be disclosed. Hashed
463 hostnames start with a M-bM-^@M-^X|M-bM-^@M-^Y character. Only one hashed hostname may
464 appear on a single line and none of the above negation or wildcard
465 operators may be applied.
466
467 Bits, exponent, and modulus are taken directly from the RSA host key;
468 they can be obtained, for example, from /etc/ssh/ssh_host_key.pub. The
469 optional comment field continues to the end of the line, and is not used.
470
471 Lines starting with M-bM-^@M-^X#M-bM-^@M-^Y and empty lines are ignored as comments.
472
473 When performing host authentication, authentication is accepted if any
474 matching line has the proper key; either one that matches exactly or, if
475 the server has presented a certificate for authentication, the key of the
476 certification authority that signed the certificate. For a key to be
477 trusted as a certification authority, it must use the M-bM-^@M-^\@cert-authorityM-bM-^@M-^]
478 marker described above.
479
480 The known hosts file also provides a facility to mark keys as revoked,
481 for example when it is known that the associated private key has been
482 stolen. Revoked keys are specified by including the M-bM-^@M-^\@revokedM-bM-^@M-^] marker at
483 the beginning of the key line, and are never accepted for authentication
484 or as certification authorities, but instead will produce a warning from
485 ssh(1) when they are encountered.
486
487 It is permissible (but not recommended) to have several lines or
488 different host keys for the same names. This will inevitably happen when
489 short forms of host names from different domains are put in the file. It
490 is possible that the files contain conflicting information;
491 authentication is accepted if valid information can be found from either
492 file.
493
494 Note that the lines in these files are typically hundreds of characters
495 long, and you definitely don't want to type in the host keys by hand.
496 Rather, generate them by a script, ssh-keyscan(1) or by taking
497 /etc/ssh/ssh_host_key.pub and adding the host names at the front.
498 ssh-keygen(1) also offers some basic automated editing for
499 ~/.ssh/known_hosts including removing hosts matching a host name and
500 converting all host names to their hashed representations.
501
502 An example ssh_known_hosts file:
503
504 # Comments allowed at start of line
505 closenet,...,192.0.2.53 1024 37 159...93 closenet.example.net
506 cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
507 # A hashed hostname
508 |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
509 AAAA1234.....=
510 # A revoked key
511 @revoked * ssh-rsa AAAAB5W...
512 # A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
513 @cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
514
515FILES
516 ~/.hushlogin
517 This file is used to suppress printing the last login time and
518 /etc/motd, if PrintLastLog and PrintMotd, respectively, are
519 enabled. It does not suppress printing of the banner specified
520 by Banner.
521
522 ~/.rhosts
523 This file is used for host-based authentication (see ssh(1) for
524 more information). On some machines this file may need to be
525 world-readable if the user's home directory is on an NFS
526 partition, because sshd reads it as root. Additionally, this
527 file must be owned by the user, and must not have write
528 permissions for anyone else. The recommended permission for most
529 machines is read/write for the user, and not accessible by
530 others.
531
532 ~/.shosts
533 This file is used in exactly the same way as .rhosts, but allows
534 host-based authentication without permitting login with
535 rlogin/rsh.
536
537 ~/.ssh/
538 This directory is the default location for all user-specific
539 configuration and authentication information. There is no
540 general requirement to keep the entire contents of this directory
541 secret, but the recommended permissions are read/write/execute
542 for the user, and not accessible by others.
543
544 ~/.ssh/authorized_keys
545 Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used
546 for logging in as this user. The format of this file is
547 described above. The content of the file is not highly
548 sensitive, but the recommended permissions are read/write for the
549 user, and not accessible by others.
550
551 If this file, the ~/.ssh directory, or the user's home directory
552 are writable by other users, then the file could be modified or
553 replaced by unauthorized users. In this case, sshd will not
554 allow it to be used unless the StrictModes option has been set to
555 M-bM-^@M-^\noM-bM-^@M-^].
556
557 ~/.ssh/environment
558 This file is read into the environment at login (if it exists).
559 It can only contain empty lines, comment lines (that start with
560 M-bM-^@M-^X#M-bM-^@M-^Y), and assignment lines of the form name=value. The file
561 should be writable only by the user; it need not be readable by
562 anyone else. Environment processing is disabled by default and
563 is controlled via the PermitUserEnvironment option.
564
565 ~/.ssh/known_hosts
566 Contains a list of host keys for all hosts the user has logged
567 into that are not already in the systemwide list of known host
568 keys. The format of this file is described above. This file
569 should be writable only by root/the owner and can, but need not
570 be, world-readable.
571
572 ~/.ssh/rc
573 Contains initialization routines to be run before the user's home
574 directory becomes accessible. This file should be writable only
575 by the user, and need not be readable by anyone else.
576
577 /etc/hosts.equiv
578 This file is for host-based authentication (see ssh(1)). It
579 should only be writable by root.
580
581 /etc/moduli
582 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group
583 Exchange" key exchange method. The file format is described in
584 moduli(5). If no usable groups are found in this file then fixed
585 internal groups will be used.
586
587 /etc/motd
588 See motd(5).
589
590 /etc/nologin
591 If this file exists, sshd refuses to let anyone except root log
592 in. The contents of the file are displayed to anyone trying to
593 log in, and non-root connections are refused. The file should be
594 world-readable.
595
596 /etc/shosts.equiv
597 This file is used in exactly the same way as hosts.equiv, but
598 allows host-based authentication without permitting login with
599 rlogin/rsh.
600
601 /etc/ssh/ssh_host_key
602 /etc/ssh/ssh_host_dsa_key
603 /etc/ssh/ssh_host_ecdsa_key
604 /etc/ssh/ssh_host_ed25519_key
605 /etc/ssh/ssh_host_rsa_key
606 These files contain the private parts of the host keys. These
607 files should only be owned by root, readable only by root, and
608 not accessible to others. Note that sshd does not start if these
609 files are group/world-accessible.
610
611 /etc/ssh/ssh_host_key.pub
612 /etc/ssh/ssh_host_dsa_key.pub
613 /etc/ssh/ssh_host_ecdsa_key.pub
614 /etc/ssh/ssh_host_ed25519_key.pub
615 /etc/ssh/ssh_host_rsa_key.pub
616 These files contain the public parts of the host keys. These
617 files should be world-readable but writable only by root. Their
618 contents should match the respective private parts. These files
619 are not really used for anything; they are provided for the
620 convenience of the user so their contents can be copied to known
621 hosts files. These files are created using ssh-keygen(1).
622
623 /etc/ssh/ssh_known_hosts
624 Systemwide list of known host keys. This file should be prepared
625 by the system administrator to contain the public host keys of
626 all machines in the organization. The format of this file is
627 described above. This file should be writable only by root/the
628 owner and should be world-readable.
629
630 /etc/ssh/sshd_config
631 Contains configuration data for sshd. The file format and
632 configuration options are described in sshd_config(5).
633
634 /etc/ssh/sshrc
635 Similar to ~/.ssh/rc, it can be used to specify machine-specific
636 login-time initializations globally. This file should be
637 writable only by root, and should be world-readable.
638
639 /var/empty
640 chroot(2) directory used by sshd during privilege separation in
641 the pre-authentication phase. The directory should not contain
642 any files and must be owned by root and not group or world-
643 writable.
644
645 /var/run/sshd.pid
646 Contains the process ID of the sshd listening for connections (if
647 there are several daemons running concurrently for different
648 ports, this contains the process ID of the one started last).
649 The content of this file is not sensitive; it can be world-
650 readable.
651
652SEE ALSO
653 scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
654 ssh-keyscan(1), chroot(2), login.conf(5), moduli(5), sshd_config(5),
655 inetd(8), sftp-server(8)
656
657AUTHORS
658 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
659 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
660 de Raadt and Dug Song removed many bugs, re-added newer features and
661 created OpenSSH. Markus Friedl contributed the support for SSH protocol
662 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
663 for privilege separation.
664
665OpenBSD 6.0 February 17, 2016 OpenBSD 6.0