summaryrefslogtreecommitdiff
path: root/sshd_config.5
diff options
context:
space:
mode:
Diffstat (limited to 'sshd_config.5')
-rw-r--r--sshd_config.5728
1 files changed, 327 insertions, 401 deletions
diff --git a/sshd_config.5 b/sshd_config.5
index 1bc26ec4d..32b29d240 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: sshd_config.5,v 1.227 2016/07/19 12:59:16 jmc Exp $ 36.\" $OpenBSD: sshd_config.5,v 1.239 2016/11/30 03:00:05 djm Exp $
37.Dd $Mdocdate: July 19 2016 $ 37.Dd $Mdocdate: November 30 2016 $
38.Dt SSHD_CONFIG 5 38.Dt SSHD_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -90,19 +90,18 @@ The default is not to accept any environment variables.
90Specifies which address family should be used by 90Specifies which address family should be used by
91.Xr sshd 8 . 91.Xr sshd 8 .
92Valid arguments are 92Valid arguments are
93.Dq any , 93.Cm any
94.Dq inet 94(the default),
95.Cm inet
95(use IPv4 only), or 96(use IPv4 only), or
96.Dq inet6 97.Cm inet6
97(use IPv6 only). 98(use IPv6 only).
98The default is
99.Dq any .
100.It Cm AllowAgentForwarding 99.It Cm AllowAgentForwarding
101Specifies whether 100Specifies whether
102.Xr ssh-agent 1 101.Xr ssh-agent 1
103forwarding is permitted. 102forwarding is permitted.
104The default is 103The default is
105.Dq yes . 104.Cm yes .
106Note that disabling agent forwarding does not improve security 105Note that disabling agent forwarding does not improve security
107unless users are also denied shell access, as they can always install 106unless users are also denied shell access, as they can always install
108their own forwarders. 107their own forwarders.
@@ -123,44 +122,42 @@ and finally
123See PATTERNS in 122See PATTERNS in
124.Xr ssh_config 5 123.Xr ssh_config 5
125for more information on patterns. 124for more information on patterns.
126.It Cm AllowTcpForwarding 125.It Cm AllowStreamLocalForwarding
127Specifies whether TCP forwarding is permitted. 126Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
128The available options are 127The available options are
129.Dq yes 128.Cm yes
129(the default)
130or 130or
131.Dq all 131.Cm all
132to allow TCP forwarding, 132to allow StreamLocal forwarding,
133.Dq no 133.Cm no
134to prevent all TCP forwarding, 134to prevent all StreamLocal forwarding,
135.Dq local 135.Cm local
136to allow local (from the perspective of 136to allow local (from the perspective of
137.Xr ssh 1 ) 137.Xr ssh 1 )
138forwarding only or 138forwarding only or
139.Dq remote 139.Cm remote
140to allow remote forwarding only. 140to allow remote forwarding only.
141The default is 141Note that disabling StreamLocal forwarding does not improve security unless
142.Dq yes .
143Note that disabling TCP forwarding does not improve security unless
144users are also denied shell access, as they can always install their 142users are also denied shell access, as they can always install their
145own forwarders. 143own forwarders.
146.It Cm AllowStreamLocalForwarding 144.It Cm AllowTcpForwarding
147Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted. 145Specifies whether TCP forwarding is permitted.
148The available options are 146The available options are
149.Dq yes 147.Cm yes
148(the default)
150or 149or
151.Dq all 150.Cm all
152to allow StreamLocal forwarding, 151to allow TCP forwarding,
153.Dq no 152.Cm no
154to prevent all StreamLocal forwarding, 153to prevent all TCP forwarding,
155.Dq local 154.Cm local
156to allow local (from the perspective of 155to allow local (from the perspective of
157.Xr ssh 1 ) 156.Xr ssh 1 )
158forwarding only or 157forwarding only or
159.Dq remote 158.Cm remote
160to allow remote forwarding only. 159to allow remote forwarding only.
161The default is 160Note that disabling TCP forwarding does not improve security unless
162.Dq yes .
163Note that disabling StreamLocal forwarding does not improve security unless
164users are also denied shell access, as they can always install their 161users are also denied shell access, as they can always install their
165own forwarders. 162own forwarders.
166.It Cm AllowUsers 163.It Cm AllowUsers
@@ -190,80 +187,73 @@ Specifies the authentication methods that must be successfully completed
190for a user to be granted access. 187for a user to be granted access.
191This option must be followed by one or more comma-separated lists of 188This option must be followed by one or more comma-separated lists of
192authentication method names, or by the single string 189authentication method names, or by the single string
193.Dq any 190.Cm any
194to indicate the default behaviour of accepting any single authentication 191to indicate the default behaviour of accepting any single authentication
195method. 192method.
196if the default is overridden, then successful authentication requires 193If the default is overridden, then successful authentication requires
197completion of every method in at least one of these lists. 194completion of every method in at least one of these lists.
198.Pp 195.Pp
199For example, an argument of 196For example,
200.Dq publickey,password publickey,keyboard-interactive 197.Qq publickey,password publickey,keyboard-interactive
201would require the user to complete public key authentication, followed by 198would require the user to complete public key authentication, followed by
202either password or keyboard interactive authentication. 199either password or keyboard interactive authentication.
203Only methods that are next in one or more lists are offered at each stage, 200Only methods that are next in one or more lists are offered at each stage,
204so for this example, it would not be possible to attempt password or 201so for this example it would not be possible to attempt password or
205keyboard-interactive authentication before public key. 202keyboard-interactive authentication before public key.
206.Pp 203.Pp
207For keyboard interactive authentication it is also possible to 204For keyboard interactive authentication it is also possible to
208restrict authentication to a specific device by appending a 205restrict authentication to a specific device by appending a
209colon followed by the device identifier 206colon followed by the device identifier
210.Dq bsdauth , 207.Cm bsdauth ,
211.Dq pam , 208.Cm pam ,
212or 209or
213.Dq skey , 210.Cm skey ,
214depending on the server configuration. 211depending on the server configuration.
215For example, 212For example,
216.Dq keyboard-interactive:bsdauth 213.Qq keyboard-interactive:bsdauth
217would restrict keyboard interactive authentication to the 214would restrict keyboard interactive authentication to the
218.Dq bsdauth 215.Cm bsdauth
219device. 216device.
220.Pp 217.Pp
221If the 218If the publickey method is listed more than once,
222.Dq publickey
223method is listed more than once,
224.Xr sshd 8 219.Xr sshd 8
225verifies that keys that have been used successfully are not reused for 220verifies that keys that have been used successfully are not reused for
226subsequent authentications. 221subsequent authentications.
227For example, an 222For example,
228.Cm AuthenticationMethods 223.Qq publickey,publickey
229of 224requires successful authentication using two different public keys.
230.Dq publickey,publickey 225.Pp
231will require successful authentication using two different public keys.
232.Pp
233This option will yield a fatal
234error if enabled if protocol 1 is also enabled.
235Note that each authentication method listed should also be explicitly enabled 226Note that each authentication method listed should also be explicitly enabled
236in the configuration. 227in the configuration.
237The default
238.Dq any
239is not to require multiple authentication; successful completion
240of a single authentication method is sufficient.
241.It Cm AuthorizedKeysCommand 228.It Cm AuthorizedKeysCommand
242Specifies a program to be used to look up the user's public keys. 229Specifies a program to be used to look up the user's public keys.
243The program must be owned by root, not writable by group or others and 230The program must be owned by root, not writable by group or others and
244specified by an absolute path. 231specified by an absolute path.
245.Pp
246Arguments to 232Arguments to
247.Cm AuthorizedKeysCommand 233.Cm AuthorizedKeysCommand
248may be provided using the following tokens, which will be expanded 234accept the tokens described in the
249at runtime: %% is replaced by a literal '%', %u is replaced by the 235.Sx TOKENS
250username being authenticated, %h is replaced by the home directory 236section.
251of the user being authenticated, %t is replaced with the key type 237If no arguments are specified then the username of the target user is used.
252offered for authentication, %f is replaced with the fingerprint of
253the key, and %k is replaced with the key being offered for authentication.
254If no arguments are specified then the username of the target user
255will be supplied.
256.Pp 238.Pp
257The program should produce on standard output zero or 239The program should produce on standard output zero or
258more lines of authorized_keys output (see AUTHORIZED_KEYS in 240more lines of authorized_keys output (see
241.Sx AUTHORIZED_KEYS
242in
259.Xr sshd 8 ) . 243.Xr sshd 8 ) .
260If a key supplied by AuthorizedKeysCommand does not successfully authenticate 244If a key supplied by
245.Cm AuthorizedKeysCommand
246does not successfully authenticate
261and authorize the user then public key authentication continues using the usual 247and authorize the user then public key authentication continues using the usual
262.Cm AuthorizedKeysFile 248.Cm AuthorizedKeysFile
263files. 249files.
264By default, no AuthorizedKeysCommand is run. 250By default, no
251.Cm AuthorizedKeysCommand
252is run.
265.It Cm AuthorizedKeysCommandUser 253.It Cm AuthorizedKeysCommandUser
266Specifies the user under whose account the AuthorizedKeysCommand is run. 254Specifies the user under whose account the
255.Cm AuthorizedKeysCommand
256is run.
267It is recommended to use a dedicated user that has no other role on the host 257It is recommended to use a dedicated user that has no other role on the host
268than running authorized keys commands. 258than running authorized keys commands.
269If 259If
@@ -274,41 +264,38 @@ is not, then
274.Xr sshd 8 264.Xr sshd 8
275will refuse to start. 265will refuse to start.
276.It Cm AuthorizedKeysFile 266.It Cm AuthorizedKeysFile
277Specifies the file that contains the public keys that can be used 267Specifies the file that contains the public keys used for user authentication.
278for user authentication.
279The format is described in the 268The format is described in the
280AUTHORIZED_KEYS FILE FORMAT 269.Sx AUTHORIZED_KEYS FILE FORMAT
281section of 270section of
282.Xr sshd 8 . 271.Xr sshd 8 .
272Arguments to
283.Cm AuthorizedKeysFile 273.Cm AuthorizedKeysFile
284may contain tokens of the form %T which are substituted during connection 274accept the tokens described in the
285setup. 275.Sx TOKENS
286The following tokens are defined: %% is replaced by a literal '%', 276section.
287%h is replaced by the home directory of the user being authenticated, and
288%u is replaced by the username of that user.
289After expansion, 277After expansion,
290.Cm AuthorizedKeysFile 278.Cm AuthorizedKeysFile
291is taken to be an absolute path or one relative to the user's home 279is taken to be an absolute path or one relative to the user's home
292directory. 280directory.
293Multiple files may be listed, separated by whitespace. 281Multiple files may be listed, separated by whitespace.
294Alternately this option may be set to 282Alternately this option may be set to
295.Dq none 283.Cm none
296to skip checking for user keys in files. 284to skip checking for user keys in files.
297The default is 285The default is
298.Dq .ssh/authorized_keys .ssh/authorized_keys2 . 286.Qq .ssh/authorized_keys .ssh/authorized_keys2 .
299.It Cm AuthorizedPrincipalsCommand 287.It Cm AuthorizedPrincipalsCommand
300Specifies a program to be used to generate the list of allowed 288Specifies a program to be used to generate the list of allowed
301certificate principals as per 289certificate principals as per
302.Cm AuthorizedPrincipalsFile . 290.Cm AuthorizedPrincipalsFile .
303The program must be owned by root, not writable by group or others and 291The program must be owned by root, not writable by group or others and
304specified by an absolute path. 292specified by an absolute path.
305.Pp
306Arguments to 293Arguments to
307.Cm AuthorizedPrincipalsCommand 294.Cm AuthorizedPrincipalsCommand
308may be provided using the following tokens, which will be expanded 295accept the tokens described in the
309at runtime: %% is replaced by a literal '%', %u is replaced by the 296.Sx TOKENS
310username being authenticated and %h is replaced by the home directory 297section.
311of the user being authenticated. 298If no arguments are specified then the username of the target user is used.
312.Pp 299.Pp
313The program should produce on standard output zero or 300The program should produce on standard output zero or
314more lines of 301more lines of
@@ -320,9 +307,13 @@ or
320.Cm AuthorizedPrincipalsFile 307.Cm AuthorizedPrincipalsFile
321is specified, then certificates offered by the client for authentication 308is specified, then certificates offered by the client for authentication
322must contain a principal that is listed. 309must contain a principal that is listed.
323By default, no AuthorizedPrincipalsCommand is run. 310By default, no
311.Cm AuthorizedPrincipalsCommand
312is run.
324.It Cm AuthorizedPrincipalsCommandUser 313.It Cm AuthorizedPrincipalsCommandUser
325Specifies the user under whose account the AuthorizedPrincipalsCommand is run. 314Specifies the user under whose account the
315.Cm AuthorizedPrincipalsCommand
316is run.
326It is recommended to use a dedicated user that has no other role on the host 317It is recommended to use a dedicated user that has no other role on the host
327than running authorized principals commands. 318than running authorized principals commands.
328If 319If
@@ -339,29 +330,28 @@ When using certificates signed by a key listed in
339.Cm TrustedUserCAKeys , 330.Cm TrustedUserCAKeys ,
340this file lists names, one of which must appear in the certificate for it 331this file lists names, one of which must appear in the certificate for it
341to be accepted for authentication. 332to be accepted for authentication.
342Names are listed one per line preceded by key options (as described 333Names are listed one per line preceded by key options (as described in
343in AUTHORIZED_KEYS FILE FORMAT in 334.Sx AUTHORIZED_KEYS FILE FORMAT
335in
344.Xr sshd 8 ) . 336.Xr sshd 8 ) .
345Empty lines and comments starting with 337Empty lines and comments starting with
346.Ql # 338.Ql #
347are ignored. 339are ignored.
348.Pp 340.Pp
341Arguments to
349.Cm AuthorizedPrincipalsFile 342.Cm AuthorizedPrincipalsFile
350may contain tokens of the form %T which are substituted during connection 343accept the tokens described in the
351setup. 344.Sx TOKENS
352The following tokens are defined: %% is replaced by a literal '%', 345section.
353%h is replaced by the home directory of the user being authenticated, and
354%u is replaced by the username of that user.
355After expansion, 346After expansion,
356.Cm AuthorizedPrincipalsFile 347.Cm AuthorizedPrincipalsFile
357is taken to be an absolute path or one relative to the user's home 348is taken to be an absolute path or one relative to the user's home directory.
358directory.
359.Pp
360The default is 349The default is
361.Dq none , 350.Cm none ,
362i.e. not to use a principals file \(en in this case, the username 351i.e. not to use a principals file \(en in this case, the username
363of the user must appear in a certificate's principals list for it to be 352of the user must appear in a certificate's principals list for it to be
364accepted. 353accepted.
354.Pp
365Note that 355Note that
366.Cm AuthorizedPrincipalsFile 356.Cm AuthorizedPrincipalsFile
367is only used when authentication proceeds using a CA listed in 357is only used when authentication proceeds using a CA listed in
@@ -377,7 +367,7 @@ for details).
377The contents of the specified file are sent to the remote user before 367The contents of the specified file are sent to the remote user before
378authentication is allowed. 368authentication is allowed.
379If the argument is 369If the argument is
380.Dq none 370.Cm none
381then no banner is displayed. 371then no banner is displayed.
382By default, no banner is displayed. 372By default, no banner is displayed.
383.It Cm ChallengeResponseAuthentication 373.It Cm ChallengeResponseAuthentication
@@ -385,7 +375,7 @@ Specifies whether challenge-response authentication is allowed (e.g. via
385PAM or through authentication styles supported in 375PAM or through authentication styles supported in
386.Xr login.conf 5 ) 376.Xr login.conf 5 )
387The default is 377The default is
388.Dq yes . 378.Cm yes .
389.It Cm ChrootDirectory 379.It Cm ChrootDirectory
390Specifies the pathname of a directory to 380Specifies the pathname of a directory to
391.Xr chroot 2 381.Xr chroot 2
@@ -397,11 +387,11 @@ which are not writable by any other user or group.
397After the chroot, 387After the chroot,
398.Xr sshd 8 388.Xr sshd 8
399changes the working directory to the user's home directory. 389changes the working directory to the user's home directory.
400.Pp 390Arguments to
401The pathname may contain the following tokens that are expanded at runtime once 391.Cm ChrootDirectory
402the connecting user has been authenticated: %% is replaced by a literal '%', 392accept the tokens described in the
403%h is replaced by the home directory of the user being authenticated, and 393.Sx TOKENS
404%u is replaced by the username of that user. 394section.
405.Pp 395.Pp
406The 396The
407.Cm ChrootDirectory 397.Cm ChrootDirectory
@@ -420,10 +410,9 @@ nodes such as
420and 410and
421.Xr tty 4 411.Xr tty 4
422devices. 412devices.
423For file transfer sessions using 413For file transfer sessions using SFTP
424.Dq sftp , 414no additional configuration of the environment is necessary if the in-process
425no additional configuration of the environment is necessary if the 415sftp-server is used,
426in-process sftp server is used,
427though sessions which use logging may require 416though sessions which use logging may require
428.Pa /dev/log 417.Pa /dev/log
429inside the chroot directory on some operating systems (see 418inside the chroot directory on some operating systems (see
@@ -438,7 +427,7 @@ Misconfiguration can lead to unsafe environments which
438cannot detect. 427cannot detect.
439.Pp 428.Pp
440The default is 429The default is
441.Dq none , 430.Cm none ,
442indicating not to 431indicating not to
443.Xr chroot 2 . 432.Xr chroot 2 .
444.It Cm Ciphers 433.It Cm Ciphers
@@ -491,23 +480,17 @@ aes128-ctr,aes192-ctr,aes256-ctr,
491aes128-gcm@openssh.com,aes256-gcm@openssh.com 480aes128-gcm@openssh.com,aes256-gcm@openssh.com
492.Ed 481.Ed
493.Pp 482.Pp
494The list of available ciphers may also be obtained using the 483The list of available ciphers may also be obtained using
495.Fl Q 484.Qq ssh -Q cipher .
496option of
497.Xr ssh 1
498with an argument of
499.Dq cipher .
500.It Cm ClientAliveCountMax 485.It Cm ClientAliveCountMax
501Sets the number of client alive messages (see below) which may be 486Sets the number of client alive messages which may be sent without
502sent without
503.Xr sshd 8 487.Xr sshd 8
504receiving any messages back from the client. 488receiving any messages back from the client.
505If this threshold is reached while client alive messages are being sent, 489If this threshold is reached while client alive messages are being sent,
506sshd will disconnect the client, terminating the session. 490sshd will disconnect the client, terminating the session.
507It is important to note that the use of client alive messages is very 491It is important to note that the use of client alive messages is very
508different from 492different from
509.Cm TCPKeepAlive 493.Cm TCPKeepAlive .
510(below).
511The client alive messages are sent through the encrypted channel 494The client alive messages are sent through the encrypted channel
512and therefore will not be spoofable. 495and therefore will not be spoofable.
513The TCP keepalive option enabled by 496The TCP keepalive option enabled by
@@ -519,7 +502,7 @@ server depend on knowing when a connection has become inactive.
519The default value is 3. 502The default value is 3.
520If 503If
521.Cm ClientAliveInterval 504.Cm ClientAliveInterval
522(see below) is set to 15, and 505is set to 15, and
523.Cm ClientAliveCountMax 506.Cm ClientAliveCountMax
524is left at the default, unresponsive SSH clients 507is left at the default, unresponsive SSH clients
525will be disconnected after approximately 45 seconds. 508will be disconnected after approximately 45 seconds.
@@ -532,15 +515,17 @@ channel to request a response from the client.
532The default 515The default
533is 0, indicating that these messages will not be sent to the client. 516is 0, indicating that these messages will not be sent to the client.
534.It Cm Compression 517.It Cm Compression
535Specifies whether compression is allowed, or delayed until 518Specifies whether compression is enabled after
536the user has authenticated successfully. 519the user has authenticated successfully.
537The argument must be 520The argument must be
538.Dq yes , 521.Cm yes ,
539.Dq delayed , 522.Cm delayed
523(a legacy synonym for
524.Cm yes )
540or 525or
541.Dq no . 526.Cm no .
542The default is 527The default is
543.Dq delayed . 528.Cm yes .
544.It Cm DenyGroups 529.It Cm DenyGroups
545This keyword can be followed by a list of group name patterns, separated 530This keyword can be followed by a list of group name patterns, separated
546by spaces. 531by spaces.
@@ -579,14 +564,20 @@ and finally
579See PATTERNS in 564See PATTERNS in
580.Xr ssh_config 5 565.Xr ssh_config 5
581for more information on patterns. 566for more information on patterns.
567.It Cm DisableForwarding
568Disables all forwarding features, including X11,
569.Xr ssh-agent 1 ,
570TCP and StreamLocal.
571This option overrides all other forwarding-related options and may
572simplify restricted configurations.
582.It Cm FingerprintHash 573.It Cm FingerprintHash
583Specifies the hash algorithm used when logging key fingerprints. 574Specifies the hash algorithm used when logging key fingerprints.
584Valid options are: 575Valid options are:
585.Dq md5 576.Cm md5
586and 577and
587.Dq sha256 . 578.Cm sha256 .
588The default is 579The default is
589.Dq sha256 . 580.Cm sha256 .
590.It Cm ForceCommand 581.It Cm ForceCommand
591Forces the execution of the command specified by 582Forces the execution of the command specified by
592.Cm ForceCommand , 583.Cm ForceCommand ,
@@ -602,12 +593,12 @@ The command originally supplied by the client is available in the
602.Ev SSH_ORIGINAL_COMMAND 593.Ev SSH_ORIGINAL_COMMAND
603environment variable. 594environment variable.
604Specifying a command of 595Specifying a command of
605.Dq internal-sftp 596.Cm internal-sftp
606will force the use of an in-process sftp server that requires no support 597will force the use of an in-process SFTP server that requires no support
607files when used with 598files when used with
608.Cm ChrootDirectory . 599.Cm ChrootDirectory .
609The default is 600The default is
610.Dq none . 601.Cm none .
611.It Cm GatewayPorts 602.It Cm GatewayPorts
612Specifies whether remote hosts are allowed to connect to ports 603Specifies whether remote hosts are allowed to connect to ports
613forwarded for the client. 604forwarded for the client.
@@ -620,38 +611,37 @@ can be used to specify that sshd
620should allow remote port forwardings to bind to non-loopback addresses, thus 611should allow remote port forwardings to bind to non-loopback addresses, thus
621allowing other hosts to connect. 612allowing other hosts to connect.
622The argument may be 613The argument may be
623.Dq no 614.Cm no
624to force remote port forwardings to be available to the local host only, 615to force remote port forwardings to be available to the local host only,
625.Dq yes 616.Cm yes
626to force remote port forwardings to bind to the wildcard address, or 617to force remote port forwardings to bind to the wildcard address, or
627.Dq clientspecified 618.Cm clientspecified
628to allow the client to select the address to which the forwarding is bound. 619to allow the client to select the address to which the forwarding is bound.
629The default is 620The default is
630.Dq no . 621.Cm no .
631.It Cm GSSAPIAuthentication 622.It Cm GSSAPIAuthentication
632Specifies whether user authentication based on GSSAPI is allowed. 623Specifies whether user authentication based on GSSAPI is allowed.
633The default is 624The default is
634.Dq no . 625.Cm no .
635.It Cm GSSAPICleanupCredentials 626.It Cm GSSAPICleanupCredentials
636Specifies whether to automatically destroy the user's credentials cache 627Specifies whether to automatically destroy the user's credentials cache
637on logout. 628on logout.
638The default is 629The default is
639.Dq yes . 630.Cm yes .
640.It Cm GSSAPIStrictAcceptorCheck 631.It Cm GSSAPIStrictAcceptorCheck
641Determines whether to be strict about the identity of the GSSAPI acceptor 632Determines whether to be strict about the identity of the GSSAPI acceptor
642a client authenticates against. 633a client authenticates against.
643If set to 634If set to
644.Dq yes 635.Cm yes
645then the client must authenticate against the 636then the client must authenticate against the host
646.Pa host
647service on the current hostname. 637service on the current hostname.
648If set to 638If set to
649.Dq no 639.Cm no
650then the client may authenticate against any service key stored in the 640then the client may authenticate against any service key stored in the
651machine's default store. 641machine's default store.
652This facility is provided to assist with operation on multi homed machines. 642This facility is provided to assist with operation on multi homed machines.
653The default is 643The default is
654.Dq yes . 644.Cm yes .
655.It Cm HostbasedAcceptedKeyTypes 645.It Cm HostbasedAcceptedKeyTypes
656Specifies the key types that will be accepted for hostbased authentication 646Specifies the key types that will be accepted for hostbased authentication
657as a comma-separated pattern list. 647as a comma-separated pattern list.
@@ -670,17 +660,14 @@ ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
670ssh-ed25519,ssh-rsa 660ssh-ed25519,ssh-rsa
671.Ed 661.Ed
672.Pp 662.Pp
673The 663The list of available key types may also be obtained using
674.Fl Q 664.Qq ssh -Q key .
675option of
676.Xr ssh 1
677may be used to list supported key types.
678.It Cm HostbasedAuthentication 665.It Cm HostbasedAuthentication
679Specifies whether rhosts or /etc/hosts.equiv authentication together 666Specifies whether rhosts or /etc/hosts.equiv authentication together
680with successful public key client host authentication is allowed 667with successful public key client host authentication is allowed
681(host-based authentication). 668(host-based authentication).
682The default is 669The default is
683.Dq no . 670.Cm no .
684.It Cm HostbasedUsesNameFromPacketOnly 671.It Cm HostbasedUsesNameFromPacketOnly
685Specifies whether or not the server will attempt to perform a reverse 672Specifies whether or not the server will attempt to perform a reverse
686name lookup when matching the name in the 673name lookup when matching the name in the
@@ -691,13 +678,13 @@ and
691files during 678files during
692.Cm HostbasedAuthentication . 679.Cm HostbasedAuthentication .
693A setting of 680A setting of
694.Dq yes 681.Cm yes
695means that 682means that
696.Xr sshd 8 683.Xr sshd 8
697uses the name supplied by the client rather than 684uses the name supplied by the client rather than
698attempting to resolve the name from the TCP connection itself. 685attempting to resolve the name from the TCP connection itself.
699The default is 686The default is
700.Dq no . 687.Cm no .
701.It Cm HostCertificate 688.It Cm HostCertificate
702Specifies a file containing a public host certificate. 689Specifies a file containing a public host certificate.
703The certificate's public key must match a private host key already specified 690The certificate's public key must match a private host key already specified
@@ -709,15 +696,12 @@ is not to load any certificates.
709.It Cm HostKey 696.It Cm HostKey
710Specifies a file containing a private host key 697Specifies a file containing a private host key
711used by SSH. 698used by SSH.
712The default is 699The defaults are
713.Pa /etc/ssh/ssh_host_key
714for protocol version 1, and
715.Pa /etc/ssh/ssh_host_dsa_key , 700.Pa /etc/ssh/ssh_host_dsa_key ,
716.Pa /etc/ssh/ssh_host_ecdsa_key , 701.Pa /etc/ssh/ssh_host_ecdsa_key ,
717.Pa /etc/ssh/ssh_host_ed25519_key 702.Pa /etc/ssh/ssh_host_ed25519_key
718and 703and
719.Pa /etc/ssh/ssh_host_rsa_key 704.Pa /etc/ssh/ssh_host_rsa_key .
720for protocol version 2.
721.Pp 705.Pp
722Note that 706Note that
723.Xr sshd 8 707.Xr sshd 8
@@ -728,14 +712,6 @@ option restricts which of the keys are actually used by
728.Xr sshd 8 . 712.Xr sshd 8 .
729.Pp 713.Pp
730It is possible to have multiple host key files. 714It is possible to have multiple host key files.
731.Dq rsa1
732keys are used for version 1 and
733.Dq dsa ,
734.Dq ecdsa ,
735.Dq ed25519
736or
737.Dq rsa
738are used for version 2 of the SSH protocol.
739It is also possible to specify public host key files instead. 715It is also possible to specify public host key files instead.
740In this case operations on the private key will be delegated 716In this case operations on the private key will be delegated
741to an 717to an
@@ -744,7 +720,7 @@ to an
744Identifies the UNIX-domain socket used to communicate 720Identifies the UNIX-domain socket used to communicate
745with an agent that has access to the private host keys. 721with an agent that has access to the private host keys.
746If the string 722If the string
747.Dq SSH_AUTH_SOCK 723.Qq SSH_AUTH_SOCK
748is specified, the location of the socket will be read from the 724is specified, the location of the socket will be read from the
749.Ev SSH_AUTH_SOCK 725.Ev SSH_AUTH_SOCK
750environment variable. 726environment variable.
@@ -762,20 +738,14 @@ ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
762ssh-ed25519,ssh-rsa 738ssh-ed25519,ssh-rsa
763.Ed 739.Ed
764.Pp 740.Pp
765The list of available key types may also be obtained using the 741The list of available key types may also be obtained using
766.Fl Q 742.Qq ssh -Q key .
767option of
768.Xr ssh 1
769with an argument of
770.Dq key .
771.It Cm IgnoreRhosts 743.It Cm IgnoreRhosts
772Specifies that 744Specifies that
773.Pa .rhosts 745.Pa .rhosts
774and 746and
775.Pa .shosts 747.Pa .shosts
776files will not be used in 748files will not be used in
777.Cm RhostsRSAAuthentication
778or
779.Cm HostbasedAuthentication . 749.Cm HostbasedAuthentication .
780.Pp 750.Pp
781.Pa /etc/hosts.equiv 751.Pa /etc/hosts.equiv
@@ -783,66 +753,64 @@ and
783.Pa /etc/shosts.equiv 753.Pa /etc/shosts.equiv
784are still used. 754are still used.
785The default is 755The default is
786.Dq yes . 756.Cm yes .
787.It Cm IgnoreUserKnownHosts 757.It Cm IgnoreUserKnownHosts
788Specifies whether 758Specifies whether
789.Xr sshd 8 759.Xr sshd 8
790should ignore the user's 760should ignore the user's
791.Pa ~/.ssh/known_hosts 761.Pa ~/.ssh/known_hosts
792during 762during
793.Cm RhostsRSAAuthentication
794or
795.Cm HostbasedAuthentication . 763.Cm HostbasedAuthentication .
796The default is 764The default is
797.Dq no . 765.Cm no .
798.It Cm IPQoS 766.It Cm IPQoS
799Specifies the IPv4 type-of-service or DSCP class for the connection. 767Specifies the IPv4 type-of-service or DSCP class for the connection.
800Accepted values are 768Accepted values are
801.Dq af11 , 769.Cm af11 ,
802.Dq af12 , 770.Cm af12 ,
803.Dq af13 , 771.Cm af13 ,
804.Dq af21 , 772.Cm af21 ,
805.Dq af22 , 773.Cm af22 ,
806.Dq af23 , 774.Cm af23 ,
807.Dq af31 , 775.Cm af31 ,
808.Dq af32 , 776.Cm af32 ,
809.Dq af33 , 777.Cm af33 ,
810.Dq af41 , 778.Cm af41 ,
811.Dq af42 , 779.Cm af42 ,
812.Dq af43 , 780.Cm af43 ,
813.Dq cs0 , 781.Cm cs0 ,
814.Dq cs1 , 782.Cm cs1 ,
815.Dq cs2 , 783.Cm cs2 ,
816.Dq cs3 , 784.Cm cs3 ,
817.Dq cs4 , 785.Cm cs4 ,
818.Dq cs5 , 786.Cm cs5 ,
819.Dq cs6 , 787.Cm cs6 ,
820.Dq cs7 , 788.Cm cs7 ,
821.Dq ef , 789.Cm ef ,
822.Dq lowdelay , 790.Cm lowdelay ,
823.Dq throughput , 791.Cm throughput ,
824.Dq reliability , 792.Cm reliability ,
825or a numeric value. 793or a numeric value.
826This option may take one or two arguments, separated by whitespace. 794This option may take one or two arguments, separated by whitespace.
827If one argument is specified, it is used as the packet class unconditionally. 795If one argument is specified, it is used as the packet class unconditionally.
828If two values are specified, the first is automatically selected for 796If two values are specified, the first is automatically selected for
829interactive sessions and the second for non-interactive sessions. 797interactive sessions and the second for non-interactive sessions.
830The default is 798The default is
831.Dq lowdelay 799.Cm lowdelay
832for interactive sessions and 800for interactive sessions and
833.Dq throughput 801.Cm throughput
834for non-interactive sessions. 802for non-interactive sessions.
835.It Cm KbdInteractiveAuthentication 803.It Cm KbdInteractiveAuthentication
836Specifies whether to allow keyboard-interactive authentication. 804Specifies whether to allow keyboard-interactive authentication.
837The argument to this keyword must be 805The argument to this keyword must be
838.Dq yes 806.Cm yes
839or 807or
840.Dq no . 808.Cm no .
841The default is to use whatever value 809The default is to use whatever value
842.Cm ChallengeResponseAuthentication 810.Cm ChallengeResponseAuthentication
843is set to 811is set to
844(by default 812(by default
845.Dq yes ) . 813.Cm yes ) .
846.It Cm KerberosAuthentication 814.It Cm KerberosAuthentication
847Specifies whether the password provided by the user for 815Specifies whether the password provided by the user for
848.Cm PasswordAuthentication 816.Cm PasswordAuthentication
@@ -850,24 +818,24 @@ will be validated through the Kerberos KDC.
850To use this option, the server needs a 818To use this option, the server needs a
851Kerberos servtab which allows the verification of the KDC's identity. 819Kerberos servtab which allows the verification of the KDC's identity.
852The default is 820The default is
853.Dq no . 821.Cm no .
854.It Cm KerberosGetAFSToken 822.It Cm KerberosGetAFSToken
855If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire 823If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
856an AFS token before accessing the user's home directory. 824an AFS token before accessing the user's home directory.
857The default is 825The default is
858.Dq no . 826.Cm no .
859.It Cm KerberosOrLocalPasswd 827.It Cm KerberosOrLocalPasswd
860If password authentication through Kerberos fails then 828If password authentication through Kerberos fails then
861the password will be validated via any additional local mechanism 829the password will be validated via any additional local mechanism
862such as 830such as
863.Pa /etc/passwd . 831.Pa /etc/passwd .
864The default is 832The default is
865.Dq yes . 833.Cm yes .
866.It Cm KerberosTicketCleanup 834.It Cm KerberosTicketCleanup
867Specifies whether to automatically destroy the user's ticket cache 835Specifies whether to automatically destroy the user's ticket cache
868file on logout. 836file on logout.
869The default is 837The default is
870.Dq yes . 838.Cm yes .
871.It Cm KexAlgorithms 839.It Cm KexAlgorithms
872Specifies the available KEX (Key Exchange) algorithms. 840Specifies the available KEX (Key Exchange) algorithms.
873Multiple algorithms must be comma-separated. 841Multiple algorithms must be comma-separated.
@@ -879,6 +847,8 @@ The supported algorithms are:
879.Pp 847.Pp
880.Bl -item -compact -offset indent 848.Bl -item -compact -offset indent
881.It 849.It
850curve25519-sha256
851.It
882curve25519-sha256@libssh.org 852curve25519-sha256@libssh.org
883.It 853.It
884diffie-hellman-group1-sha1 854diffie-hellman-group1-sha1
@@ -898,27 +868,14 @@ ecdh-sha2-nistp521
898.Pp 868.Pp
899The default is: 869The default is:
900.Bd -literal -offset indent 870.Bd -literal -offset indent
901curve25519-sha256@libssh.org, 871curve25519-sha256,curve25519-sha256@libssh.org,
902ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 872ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
903diffie-hellman-group-exchange-sha256, 873diffie-hellman-group-exchange-sha256,
904diffie-hellman-group14-sha1 874diffie-hellman-group14-sha1
905.Ed 875.Ed
906.Pp 876.Pp
907The list of available key exchange algorithms may also be obtained using the 877The list of available key exchange algorithms may also be obtained using
908.Fl Q 878.Qq ssh -Q kex .
909option of
910.Xr ssh 1
911with an argument of
912.Dq kex .
913.It Cm KeyRegenerationInterval
914In protocol version 1, the ephemeral server key is automatically regenerated
915after this many seconds (if it has been used).
916The purpose of regeneration is to prevent
917decrypting captured sessions by later breaking into the machine and
918stealing the keys.
919The key is never stored anywhere.
920If the value is 0, the key is never regenerated.
921The default is 3600 (seconds).
922.It Cm ListenAddress 879.It Cm ListenAddress
923Specifies the local addresses 880Specifies the local addresses
924.Xr sshd 8 881.Xr sshd 8
@@ -978,7 +935,7 @@ character, then the specified algorithms will be appended to the default set
978instead of replacing them. 935instead of replacing them.
979.Pp 936.Pp
980The algorithms that contain 937The algorithms that contain
981.Dq -etm 938.Qq -etm
982calculate the MAC after encryption (encrypt-then-mac). 939calculate the MAC after encryption (encrypt-then-mac).
983These are considered safer and their use recommended. 940These are considered safer and their use recommended.
984The supported MACs are: 941The supported MACs are:
@@ -1031,12 +988,8 @@ umac-64@openssh.com,umac-128@openssh.com,
1031hmac-sha2-256,hmac-sha2-512,hmac-sha1 988hmac-sha2-256,hmac-sha2-512,hmac-sha1
1032.Ed 989.Ed
1033.Pp 990.Pp
1034The list of available MAC algorithms may also be obtained using the 991The list of available MAC algorithms may also be obtained using
1035.Fl Q 992.Qq ssh -Q mac .
1036option of
1037.Xr ssh 1
1038with an argument of
1039.Dq mac .
1040.It Cm Match 993.It Cm Match
1041Introduces a conditional block. 994Introduces a conditional block.
1042If all of the criteria on the 995If all of the criteria on the
@@ -1065,24 +1018,19 @@ and
1065.Cm Address . 1018.Cm Address .
1066The match patterns may consist of single entries or comma-separated 1019The match patterns may consist of single entries or comma-separated
1067lists and may use the wildcard and negation operators described in the 1020lists and may use the wildcard and negation operators described in the
1068PATTERNS section of 1021.Sx PATTERNS
1022section of
1069.Xr ssh_config 5 . 1023.Xr ssh_config 5 .
1070.Pp 1024.Pp
1071The patterns in an 1025The patterns in an
1072.Cm Address 1026.Cm Address
1073criteria may additionally contain addresses to match in CIDR 1027criteria may additionally contain addresses to match in CIDR
1074address/masklen format, e.g.\& 1028address/masklen format,
1075.Dq 192.0.2.0/24 1029such as 192.0.2.0/24 or 2001:db8::/32.
1076or
1077.Dq 3ffe:ffff::/32 .
1078Note that the mask length provided must be consistent with the address - 1030Note that the mask length provided must be consistent with the address -
1079it is an error to specify a mask length that is too long for the address 1031it is an error to specify a mask length that is too long for the address
1080or one with bits set in this host portion of the address. 1032or one with bits set in this host portion of the address.
1081For example, 1033For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1082.Dq 192.0.2.0/33
1083and
1084.Dq 192.0.2.0/8
1085respectively.
1086.Pp 1034.Pp
1087Only a subset of keywords may be used on the lines following a 1035Only a subset of keywords may be used on the lines following a
1088.Cm Match 1036.Cm Match
@@ -1103,6 +1051,8 @@ Available keywords are
1103.Cm AuthorizedPrincipalsFile , 1051.Cm AuthorizedPrincipalsFile ,
1104.Cm Banner , 1052.Cm Banner ,
1105.Cm ChrootDirectory , 1053.Cm ChrootDirectory ,
1054.Cm ClientAliveCountMax ,
1055.Cm ClientAliveInterval ,
1106.Cm DenyGroups , 1056.Cm DenyGroups ,
1107.Cm DenyUsers , 1057.Cm DenyUsers ,
1108.Cm ForceCommand , 1058.Cm ForceCommand ,
@@ -1127,8 +1077,6 @@ Available keywords are
1127.Cm PubkeyAuthentication , 1077.Cm PubkeyAuthentication ,
1128.Cm RekeyLimit , 1078.Cm RekeyLimit ,
1129.Cm RevokedKeys , 1079.Cm RevokedKeys ,
1130.Cm RhostsRSAAuthentication ,
1131.Cm RSAAuthentication ,
1132.Cm StreamLocalBindMask , 1080.Cm StreamLocalBindMask ,
1133.Cm StreamLocalBindUnlink , 1081.Cm StreamLocalBindUnlink ,
1134.Cm TrustedUserCAKeys , 1082.Cm TrustedUserCAKeys ,
@@ -1163,29 +1111,21 @@ The default is 10:30:100.
1163.Pp 1111.Pp
1164Alternatively, random early drop can be enabled by specifying 1112Alternatively, random early drop can be enabled by specifying
1165the three colon separated values 1113the three colon separated values
1166.Dq start:rate:full 1114start:rate:full (e.g. "10:30:60").
1167(e.g. "10:30:60").
1168.Xr sshd 8 1115.Xr sshd 8
1169will refuse connection attempts with a probability of 1116will refuse connection attempts with a probability of rate/100 (30%)
1170.Dq rate/100 1117if there are currently start (10) unauthenticated connections.
1171(30%)
1172if there are currently
1173.Dq start
1174(10)
1175unauthenticated connections.
1176The probability increases linearly and all connection attempts 1118The probability increases linearly and all connection attempts
1177are refused if the number of unauthenticated connections reaches 1119are refused if the number of unauthenticated connections reaches full (60).
1178.Dq full
1179(60).
1180.It Cm PasswordAuthentication 1120.It Cm PasswordAuthentication
1181Specifies whether password authentication is allowed. 1121Specifies whether password authentication is allowed.
1182The default is 1122The default is
1183.Dq yes . 1123.Cm yes .
1184.It Cm PermitEmptyPasswords 1124.It Cm PermitEmptyPasswords
1185When password authentication is allowed, it specifies whether the 1125When password authentication is allowed, it specifies whether the
1186server allows login to accounts with empty password strings. 1126server allows login to accounts with empty password strings.
1187The default is 1127The default is
1188.Dq no . 1128.Cm no .
1189.It Cm PermitOpen 1129.It Cm PermitOpen
1190Specifies the destinations to which TCP port forwarding is permitted. 1130Specifies the destinations to which TCP port forwarding is permitted.
1191The forwarding specification must be one of the following forms: 1131The forwarding specification must be one of the following forms:
@@ -1210,36 +1150,36 @@ The forwarding specification must be one of the following forms:
1210.Pp 1150.Pp
1211Multiple forwards may be specified by separating them with whitespace. 1151Multiple forwards may be specified by separating them with whitespace.
1212An argument of 1152An argument of
1213.Dq any 1153.Cm any
1214can be used to remove all restrictions and permit any forwarding requests. 1154can be used to remove all restrictions and permit any forwarding requests.
1215An argument of 1155An argument of
1216.Dq none 1156.Cm none
1217can be used to prohibit all forwarding requests. 1157can be used to prohibit all forwarding requests.
1218The wildcard 1158The wildcard
1219.Dq * 1159.Sq *
1220can be used for host or port to allow all hosts or ports, respectively. 1160can be used for host or port to allow all hosts or ports, respectively.
1221By default all port forwarding requests are permitted. 1161By default all port forwarding requests are permitted.
1222.It Cm PermitRootLogin 1162.It Cm PermitRootLogin
1223Specifies whether root can log in using 1163Specifies whether root can log in using
1224.Xr ssh 1 . 1164.Xr ssh 1 .
1225The argument must be 1165The argument must be
1226.Dq yes , 1166.Cm yes ,
1227.Dq prohibit-password , 1167.Cm prohibit-password ,
1228.Dq without-password , 1168.Cm without-password ,
1229.Dq forced-commands-only , 1169.Cm forced-commands-only ,
1230or 1170or
1231.Dq no . 1171.Cm no .
1232The default is 1172The default is
1233.Dq prohibit-password . 1173.Cm prohibit-password .
1234.Pp 1174.Pp
1235If this option is set to 1175If this option is set to
1236.Dq prohibit-password 1176.Cm prohibit-password
1237or 1177or
1238.Dq without-password , 1178.Cm without-password ,
1239password and keyboard-interactive authentication are disabled for root. 1179password and keyboard-interactive authentication are disabled for root.
1240.Pp 1180.Pp
1241If this option is set to 1181If this option is set to
1242.Dq forced-commands-only , 1182.Cm forced-commands-only ,
1243root login with public key authentication will be allowed, 1183root login with public key authentication will be allowed,
1244but only if the 1184but only if the
1245.Ar command 1185.Ar command
@@ -1249,37 +1189,37 @@ normally not allowed).
1249All other authentication methods are disabled for root. 1189All other authentication methods are disabled for root.
1250.Pp 1190.Pp
1251If this option is set to 1191If this option is set to
1252.Dq no , 1192.Cm no ,
1253root is not allowed to log in. 1193root is not allowed to log in.
1194.It Cm PermitTTY
1195Specifies whether
1196.Xr pty 4
1197allocation is permitted.
1198The default is
1199.Cm yes .
1254.It Cm PermitTunnel 1200.It Cm PermitTunnel
1255Specifies whether 1201Specifies whether
1256.Xr tun 4 1202.Xr tun 4
1257device forwarding is allowed. 1203device forwarding is allowed.
1258The argument must be 1204The argument must be
1259.Dq yes , 1205.Cm yes ,
1260.Dq point-to-point 1206.Cm point-to-point
1261(layer 3), 1207(layer 3),
1262.Dq ethernet 1208.Cm ethernet
1263(layer 2), or 1209(layer 2), or
1264.Dq no . 1210.Cm no .
1265Specifying 1211Specifying
1266.Dq yes 1212.Cm yes
1267permits both 1213permits both
1268.Dq point-to-point 1214.Cm point-to-point
1269and 1215and
1270.Dq ethernet . 1216.Cm ethernet .
1271The default is 1217The default is
1272.Dq no . 1218.Cm no .
1273.Pp 1219.Pp
1274Independent of this setting, the permissions of the selected 1220Independent of this setting, the permissions of the selected
1275.Xr tun 4 1221.Xr tun 4
1276device must allow access to the user. 1222device must allow access to the user.
1277.It Cm PermitTTY
1278Specifies whether
1279.Xr pty 4
1280allocation is permitted.
1281The default is
1282.Dq yes .
1283.It Cm PermitUserEnvironment 1223.It Cm PermitUserEnvironment
1284Specifies whether 1224Specifies whether
1285.Pa ~/.ssh/environment 1225.Pa ~/.ssh/environment
@@ -1290,7 +1230,7 @@ options in
1290are processed by 1230are processed by
1291.Xr sshd 8 . 1231.Xr sshd 8 .
1292The default is 1232The default is
1293.Dq no . 1233.Cm no .
1294Enabling environment processing may enable users to bypass access 1234Enabling environment processing may enable users to bypass access
1295restrictions in some configurations using mechanisms such as 1235restrictions in some configurations using mechanisms such as
1296.Ev LD_PRELOAD . 1236.Ev LD_PRELOAD .
@@ -1299,11 +1239,11 @@ Specifies whether any
1299.Pa ~/.ssh/rc 1239.Pa ~/.ssh/rc
1300file is executed. 1240file is executed.
1301The default is 1241The default is
1302.Dq yes . 1242.Cm yes .
1303.It Cm PidFile 1243.It Cm PidFile
1304Specifies the file that contains the process ID of the 1244Specifies the file that contains the process ID of the
1305SSH daemon, or 1245SSH daemon, or
1306.Dq none 1246.Cm none
1307to not write one. 1247to not write one.
1308The default is 1248The default is
1309.Pa /var/run/sshd.pid . 1249.Pa /var/run/sshd.pid .
@@ -1321,7 +1261,7 @@ Specifies whether
1321should print the date and time of the last user login when a user logs 1261should print the date and time of the last user login when a user logs
1322in interactively. 1262in interactively.
1323The default is 1263The default is
1324.Dq yes . 1264.Cm yes .
1325.It Cm PrintMotd 1265.It Cm PrintMotd
1326Specifies whether 1266Specifies whether
1327.Xr sshd 8 1267.Xr sshd 8
@@ -1332,29 +1272,7 @@ when a user logs in interactively.
1332.Pa /etc/profile , 1272.Pa /etc/profile ,
1333or equivalent.) 1273or equivalent.)
1334The default is 1274The default is
1335.Dq yes . 1275.Cm yes .
1336.It Cm Protocol
1337Specifies the protocol versions
1338.Xr sshd 8
1339supports.
1340The possible values are
1341.Sq 1
1342and
1343.Sq 2 .
1344Multiple versions must be comma-separated.
1345The default is
1346.Sq 2 .
1347Protocol 1 suffers from a number of cryptographic weaknesses and should
1348not be used.
1349It is only offered to support legacy devices.
1350.Pp
1351Note that the order of the protocol list does not indicate preference,
1352because the client selects among multiple protocol versions offered
1353by the server.
1354Specifying
1355.Dq 2,1
1356is identical to
1357.Dq 1,2 .
1358.It Cm PubkeyAcceptedKeyTypes 1276.It Cm PubkeyAcceptedKeyTypes
1359Specifies the key types that will be accepted for public key authentication 1277Specifies the key types that will be accepted for public key authentication
1360as a comma-separated pattern list. 1278as a comma-separated pattern list.
@@ -1373,15 +1291,12 @@ ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1373ssh-ed25519,ssh-rsa 1291ssh-ed25519,ssh-rsa
1374.Ed 1292.Ed
1375.Pp 1293.Pp
1376The 1294The list of available key types may also be obtained using
1377.Fl Q 1295.Qq ssh -Q key .
1378option of
1379.Xr ssh 1
1380may be used to list supported key types.
1381.It Cm PubkeyAuthentication 1296.It Cm PubkeyAuthentication
1382Specifies whether public key authentication is allowed. 1297Specifies whether public key authentication is allowed.
1383The default is 1298The default is
1384.Dq yes . 1299.Cm yes .
1385.It Cm RekeyLimit 1300.It Cm RekeyLimit
1386Specifies the maximum amount of data that may be transmitted before the 1301Specifies the maximum amount of data that may be transmitted before the
1387session key is renegotiated, optionally followed a maximum amount of 1302session key is renegotiated, optionally followed a maximum amount of
@@ -1404,12 +1319,12 @@ section.
1404The default value for 1319The default value for
1405.Cm RekeyLimit 1320.Cm RekeyLimit
1406is 1321is
1407.Dq default none , 1322.Cm default none ,
1408which means that rekeying is performed after the cipher's default amount 1323which means that rekeying is performed after the cipher's default amount
1409of data has been sent or received and no time based rekeying is done. 1324of data has been sent or received and no time based rekeying is done.
1410.It Cm RevokedKeys 1325.It Cm RevokedKeys
1411Specifies revoked public keys file, or 1326Specifies revoked public keys file, or
1412.Dq none 1327.Cm none
1413to not use one. 1328to not use one.
1414Keys listed in this file will be refused for public key authentication. 1329Keys listed in this file will be refused for public key authentication.
1415Note that if this file is not readable, then public key authentication will 1330Note that if this file is not readable, then public key authentication will
@@ -1419,20 +1334,6 @@ an OpenSSH Key Revocation List (KRL) as generated by
1419.Xr ssh-keygen 1 . 1334.Xr ssh-keygen 1 .
1420For more information on KRLs, see the KEY REVOCATION LISTS section in 1335For more information on KRLs, see the KEY REVOCATION LISTS section in
1421.Xr ssh-keygen 1 . 1336.Xr ssh-keygen 1 .
1422.It Cm RhostsRSAAuthentication
1423Specifies whether rhosts or /etc/hosts.equiv authentication together
1424with successful RSA host authentication is allowed.
1425The default is
1426.Dq no .
1427This option applies to protocol version 1 only.
1428.It Cm RSAAuthentication
1429Specifies whether pure RSA authentication is allowed.
1430The default is
1431.Dq yes .
1432This option applies to protocol version 1 only.
1433.It Cm ServerKeyBits
1434Defines the number of bits in the ephemeral protocol version 1 server key.
1435The default and minimum value is 1024.
1436.It Cm StreamLocalBindMask 1337.It Cm StreamLocalBindMask
1437Sets the octal file creation mode mask 1338Sets the octal file creation mode mask
1438.Pq umask 1339.Pq umask
@@ -1455,11 +1356,11 @@ will be unable to forward the port to the Unix-domain socket file.
1455This option is only used for port forwarding to a Unix-domain socket file. 1356This option is only used for port forwarding to a Unix-domain socket file.
1456.Pp 1357.Pp
1457The argument must be 1358The argument must be
1458.Dq yes 1359.Cm yes
1459or 1360or
1460.Dq no . 1361.Cm no .
1461The default is 1362The default is
1462.Dq no . 1363.Cm no .
1463.It Cm StrictModes 1364.It Cm StrictModes
1464Specifies whether 1365Specifies whether
1465.Xr sshd 8 1366.Xr sshd 8
@@ -1468,7 +1369,7 @@ user's files and home directory before accepting login.
1468This is normally desirable because novices sometimes accidentally leave their 1369This is normally desirable because novices sometimes accidentally leave their
1469directory or files world-writable. 1370directory or files world-writable.
1470The default is 1371The default is
1471.Dq yes . 1372.Cm yes .
1472Note that this does not apply to 1373Note that this does not apply to
1473.Cm ChrootDirectory , 1374.Cm ChrootDirectory ,
1474whose permissions and ownership are checked unconditionally. 1375whose permissions and ownership are checked unconditionally.
@@ -1478,16 +1379,12 @@ Arguments should be a subsystem name and a command (with optional arguments)
1478to execute upon subsystem request. 1379to execute upon subsystem request.
1479.Pp 1380.Pp
1480The command 1381The command
1481.Xr sftp-server 8 1382.Cm sftp-server
1482implements the 1383implements the SFTP file transfer subsystem.
1483.Dq sftp
1484file transfer subsystem.
1485.Pp 1384.Pp
1486Alternately the name 1385Alternately the name
1487.Dq internal-sftp 1386.Cm internal-sftp
1488implements an in-process 1387implements an in-process SFTP server.
1489.Dq sftp
1490server.
1491This may simplify configurations using 1388This may simplify configurations using
1492.Cm ChrootDirectory 1389.Cm ChrootDirectory
1493to force a different filesystem root on clients. 1390to force a different filesystem root on clients.
@@ -1509,21 +1406,21 @@ connections will die if the route is down temporarily, and some people
1509find it annoying. 1406find it annoying.
1510On the other hand, if TCP keepalives are not sent, 1407On the other hand, if TCP keepalives are not sent,
1511sessions may hang indefinitely on the server, leaving 1408sessions may hang indefinitely on the server, leaving
1512.Dq ghost 1409.Qq ghost
1513users and consuming server resources. 1410users and consuming server resources.
1514.Pp 1411.Pp
1515The default is 1412The default is
1516.Dq yes 1413.Cm yes
1517(to send TCP keepalive messages), and the server will notice 1414(to send TCP keepalive messages), and the server will notice
1518if the network goes down or the client host crashes. 1415if the network goes down or the client host crashes.
1519This avoids infinitely hanging sessions. 1416This avoids infinitely hanging sessions.
1520.Pp 1417.Pp
1521To disable TCP keepalive messages, the value should be set to 1418To disable TCP keepalive messages, the value should be set to
1522.Dq no . 1419.Cm no .
1523.It Cm TrustedUserCAKeys 1420.It Cm TrustedUserCAKeys
1524Specifies a file containing public keys of certificate authorities that are 1421Specifies a file containing public keys of certificate authorities that are
1525trusted to sign user certificates for authentication, or 1422trusted to sign user certificates for authentication, or
1526.Dq none 1423.Cm none
1527to not use one. 1424to not use one.
1528Keys are listed one per line; empty lines and comments starting with 1425Keys are listed one per line; empty lines and comments starting with
1529.Ql # 1426.Ql #
@@ -1544,7 +1441,7 @@ the resolved host name for the remote IP address maps back to the
1544very same IP address. 1441very same IP address.
1545.Pp 1442.Pp
1546If this option is set to 1443If this option is set to
1547.Dq no 1444.Cm no
1548(the default) then only addresses and not host names may be used in 1445(the default) then only addresses and not host names may be used in
1549.Pa ~/.ssh/authorized_keys 1446.Pa ~/.ssh/authorized_keys
1550.Cm from 1447.Cm from
@@ -1553,29 +1450,10 @@ and
1553.Cm Match 1450.Cm Match
1554.Cm Host 1451.Cm Host
1555directives. 1452directives.
1556.It Cm UseLogin
1557Specifies whether
1558.Xr login 1
1559is used for interactive login sessions.
1560The default is
1561.Dq no .
1562Note that
1563.Xr login 1
1564is never used for remote command execution.
1565Note also, that if this is enabled,
1566.Cm X11Forwarding
1567will be disabled because
1568.Xr login 1
1569does not know how to handle
1570.Xr xauth 1
1571cookies.
1572If
1573.Cm UsePrivilegeSeparation
1574is specified, it will be disabled after authentication.
1575.It Cm UsePAM 1453.It Cm UsePAM
1576Enables the Pluggable Authentication Module interface. 1454Enables the Pluggable Authentication Module interface.
1577If set to 1455If set to
1578.Dq yes 1456.Cm yes
1579this will enable PAM authentication using 1457this will enable PAM authentication using
1580.Cm ChallengeResponseAuthentication 1458.Cm ChallengeResponseAuthentication
1581and 1459and
@@ -1595,7 +1473,7 @@ is enabled, you will not be able to run
1595.Xr sshd 8 1473.Xr sshd 8
1596as a non-root user. 1474as a non-root user.
1597The default is 1475The default is
1598.Dq no . 1476.Cm no .
1599.It Cm UsePrivilegeSeparation 1477.It Cm UsePrivilegeSeparation
1600Specifies whether 1478Specifies whether
1601.Xr sshd 8 1479.Xr sshd 8
@@ -1606,23 +1484,23 @@ the privilege of the authenticated user.
1606The goal of privilege separation is to prevent privilege 1484The goal of privilege separation is to prevent privilege
1607escalation by containing any corruption within the unprivileged processes. 1485escalation by containing any corruption within the unprivileged processes.
1608The argument must be 1486The argument must be
1609.Dq yes , 1487.Cm yes ,
1610.Dq no , 1488.Cm no ,
1611or 1489or
1612.Dq sandbox . 1490.Cm sandbox .
1613If 1491If
1614.Cm UsePrivilegeSeparation 1492.Cm UsePrivilegeSeparation
1615is set to 1493is set to
1616.Dq sandbox 1494.Cm sandbox
1617then the pre-authentication unprivileged process is subject to additional 1495then the pre-authentication unprivileged process is subject to additional
1618restrictions. 1496restrictions.
1619The default is 1497The default is
1620.Dq sandbox . 1498.Cm sandbox .
1621.It Cm VersionAddendum 1499.It Cm VersionAddendum
1622Optionally specifies additional text to append to the SSH protocol banner 1500Optionally specifies additional text to append to the SSH protocol banner
1623sent by the server upon connection. 1501sent by the server upon connection.
1624The default is 1502The default is
1625.Dq none . 1503.Cm none .
1626.It Cm X11DisplayOffset 1504.It Cm X11DisplayOffset
1627Specifies the first display number available for 1505Specifies the first display number available for
1628.Xr sshd 8 Ns 's 1506.Xr sshd 8 Ns 's
@@ -1632,18 +1510,18 @@ The default is 10.
1632.It Cm X11Forwarding 1510.It Cm X11Forwarding
1633Specifies whether X11 forwarding is permitted. 1511Specifies whether X11 forwarding is permitted.
1634The argument must be 1512The argument must be
1635.Dq yes 1513.Cm yes
1636or 1514or
1637.Dq no . 1515.Cm no .
1638The default is 1516The default is
1639.Dq no . 1517.Cm no .
1640.Pp 1518.Pp
1641When X11 forwarding is enabled, there may be additional exposure to 1519When X11 forwarding is enabled, there may be additional exposure to
1642the server and to client displays if the 1520the server and to client displays if the
1643.Xr sshd 8 1521.Xr sshd 8
1644proxy display is configured to listen on the wildcard address (see 1522proxy display is configured to listen on the wildcard address (see
1645.Cm X11UseLocalhost 1523.Cm X11UseLocalhost ) ,
1646below), though this is not the default. 1524though this is not the default.
1647Additionally, the authentication spoofing and authentication data 1525Additionally, the authentication spoofing and authentication data
1648verification and substitution occur on the client side. 1526verification and substitution occur on the client side.
1649The security risk of using X11 forwarding is that the client's X11 1527The security risk of using X11 forwarding is that the client's X11
@@ -1655,14 +1533,11 @@ in
1655A system administrator may have a stance in which they want to 1533A system administrator may have a stance in which they want to
1656protect clients that may expose themselves to attack by unwittingly 1534protect clients that may expose themselves to attack by unwittingly
1657requesting X11 forwarding, which can warrant a 1535requesting X11 forwarding, which can warrant a
1658.Dq no 1536.Cm no
1659setting. 1537setting.
1660.Pp 1538.Pp
1661Note that disabling X11 forwarding does not prevent users from 1539Note that disabling X11 forwarding does not prevent users from
1662forwarding X11 traffic, as users can always install their own forwarders. 1540forwarding X11 traffic, as users can always install their own forwarders.
1663X11 forwarding is automatically disabled if
1664.Cm UseLogin
1665is enabled.
1666.It Cm X11UseLocalhost 1541.It Cm X11UseLocalhost
1667Specifies whether 1542Specifies whether
1668.Xr sshd 8 1543.Xr sshd 8
@@ -1673,26 +1548,26 @@ sshd binds the forwarding server to the loopback address and sets the
1673hostname part of the 1548hostname part of the
1674.Ev DISPLAY 1549.Ev DISPLAY
1675environment variable to 1550environment variable to
1676.Dq localhost . 1551.Cm localhost .
1677This prevents remote hosts from connecting to the proxy display. 1552This prevents remote hosts from connecting to the proxy display.
1678However, some older X11 clients may not function with this 1553However, some older X11 clients may not function with this
1679configuration. 1554configuration.
1680.Cm X11UseLocalhost 1555.Cm X11UseLocalhost
1681may be set to 1556may be set to
1682.Dq no 1557.Cm no
1683to specify that the forwarding server should be bound to the wildcard 1558to specify that the forwarding server should be bound to the wildcard
1684address. 1559address.
1685The argument must be 1560The argument must be
1686.Dq yes 1561.Cm yes
1687or 1562or
1688.Dq no . 1563.Cm no .
1689The default is 1564The default is
1690.Dq yes . 1565.Cm yes .
1691.It Cm XAuthLocation 1566.It Cm XAuthLocation
1692Specifies the full pathname of the 1567Specifies the full pathname of the
1693.Xr xauth 1 1568.Xr xauth 1
1694program, or 1569program, or
1695.Dq none 1570.Cm none
1696to not use one. 1571to not use one.
1697The default is 1572The default is
1698.Pa /usr/X11R6/bin/xauth . 1573.Pa /usr/X11R6/bin/xauth .
@@ -1738,6 +1613,50 @@ Time format examples:
1738.It 1h30m 1613.It 1h30m
17391 hour 30 minutes (90 minutes) 16141 hour 30 minutes (90 minutes)
1740.El 1615.El
1616.Sh TOKENS
1617Arguments to some keywords can make use of tokens,
1618which are expanded at runtime:
1619.Pp
1620.Bl -tag -width XXXX -offset indent -compact
1621.It %%
1622A literal
1623.Sq % .
1624.It %F
1625The fingerprint of the CA key.
1626.It %f
1627The fingerprint of the key or certificate.
1628.It %h
1629The home directory of the user.
1630.It %i
1631The key ID in the certificate.
1632.It %K
1633The base64-encoded CA key.
1634.It %k
1635The base64-encoded key or certificate for authentication.
1636.It %s
1637The serial number of the certificate.
1638.It \&%T
1639The type of the CA key.
1640.It %t
1641The key or certificate type.
1642.It %u
1643The username.
1644.El
1645.Pp
1646.Cm AuthorizedKeysCommand
1647accepts the tokens %%, %f, %h, %t, and %u.
1648.Pp
1649.Cm AuthorizedKeysFile
1650accepts the tokens %%, %h, and %u.
1651.Pp
1652.Cm AuthorizedPrincipalsCommand
1653accepts the tokens %%, %F, %f, %K, %k, %h, %i, %s, %T, %t, and %u.
1654.Pp
1655.Cm AuthorizedPrincipalsFile
1656accepts the tokens %%, %h, and %u.
1657.Pp
1658.Cm ChrootDirectory
1659accepts the tokens %%, %h, and %u.
1741.Sh FILES 1660.Sh FILES
1742.Bl -tag -width Ds 1661.Bl -tag -width Ds
1743.It Pa /etc/ssh/sshd_config 1662.It Pa /etc/ssh/sshd_config
@@ -1747,15 +1666,22 @@ This file should be writable by root only, but it is recommended
1747(though not necessary) that it be world-readable. 1666(though not necessary) that it be world-readable.
1748.El 1667.El
1749.Sh SEE ALSO 1668.Sh SEE ALSO
1669.Xr sftp-server 8 ,
1750.Xr sshd 8 1670.Xr sshd 8
1751.Sh AUTHORS 1671.Sh AUTHORS
1672.An -nosplit
1752OpenSSH is a derivative of the original and free 1673OpenSSH is a derivative of the original and free
1753ssh 1.2.12 release by Tatu Ylonen. 1674ssh 1.2.12 release by
1754Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, 1675.An Tatu Ylonen .
1755Theo de Raadt and Dug Song 1676.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
1677.An Theo de Raadt
1678and
1679.An Dug Song
1756removed many bugs, re-added newer features and 1680removed many bugs, re-added newer features and
1757created OpenSSH. 1681created OpenSSH.
1758Markus Friedl contributed the support for SSH 1682.An Markus Friedl
1759protocol versions 1.5 and 2.0. 1683contributed the support for SSH protocol versions 1.5 and 2.0.
1760Niels Provos and Markus Friedl contributed support 1684.An Niels Provos
1761for privilege separation. 1685and
1686.An Markus Friedl
1687contributed support for privilege separation.