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