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