| 1 |
.\" |
| 2 |
.\" Author: Tatu Ylonen <[email protected]> |
| 3 |
.\" Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland |
| 4 |
.\" All rights reserved |
| 5 |
.\" |
| 6 |
.\" As far as I am concerned, the code I have written for this software |
| 7 |
.\" can be used freely for any purpose. Any derived versions of this |
| 8 |
.\" software must be clearly marked as such, and if the derived work is |
| 9 |
.\" incompatible with the protocol description in the RFC file, it must be |
| 10 |
.\" called by a name other than "ssh" or "Secure Shell". |
| 11 |
.\" |
| 12 |
.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. |
| 13 |
.\" Copyright (c) 1999 Aaron Campbell. All rights reserved. |
| 14 |
.\" Copyright (c) 1999 Theo de Raadt. All rights reserved. |
| 15 |
.\" |
| 16 |
.\" Redistribution and use in source and binary forms, with or without |
| 17 |
.\" modification, are permitted provided that the following conditions |
| 18 |
.\" are met: |
| 19 |
.\" 1. Redistributions of source code must retain the above copyright |
| 20 |
.\" notice, this list of conditions and the following disclaimer. |
| 21 |
.\" 2. Redistributions in binary form must reproduce the above copyright |
| 22 |
.\" notice, this list of conditions and the following disclaimer in the |
| 23 |
.\" documentation and/or other materials provided with the distribution. |
| 24 |
.\" |
| 25 |
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 26 |
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 27 |
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 28 |
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 29 |
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 30 |
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 31 |
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 32 |
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 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. |
| 35 |
.\" |
| 36 |
.\" $OpenBSD: sshd_config.5,v 1.397 2026/03/28 05:07:12 djm Exp $ |
| 37 |
.Dd $Mdocdate: March 28 2026 $ |
| 38 |
.Dt SSHD_CONFIG 5 |
| 39 |
.Os |
| 40 |
.Sh NAME |
| 41 |
.Nm sshd_config |
| 42 |
.Nd OpenSSH daemon configuration file |
| 43 |
.Sh DESCRIPTION |
| 44 |
.Xr sshd 8 |
| 45 |
reads configuration data from |
| 46 |
.Pa /etc/ssh/sshd_config |
| 47 |
(or the file specified with |
| 48 |
.Fl f |
| 49 |
on the command line). |
| 50 |
The file contains keyword-argument pairs, one per line. |
| 51 |
Unless noted otherwise, for each keyword, the first obtained value will be used. |
| 52 |
Lines starting with |
| 53 |
.Ql # |
| 54 |
and empty lines are interpreted as comments. |
| 55 |
Arguments may optionally be enclosed in double quotes |
| 56 |
.Pq \&" |
| 57 |
in order to represent arguments containing spaces. |
| 58 |
.Pp |
| 59 |
Note that the Debian |
| 60 |
.Ic openssh-server |
| 61 |
package sets several options as standard in |
| 62 |
.Pa /etc/ssh/sshd_config |
| 63 |
which are not the default in |
| 64 |
.Xr sshd 8 : |
| 65 |
.Pp |
| 66 |
.Bl -bullet -offset indent -compact |
| 67 |
.It |
| 68 |
.Cm Include /etc/ssh/sshd_config.d/*.conf |
| 69 |
.It |
| 70 |
.Cm KbdInteractiveAuthentication No no |
| 71 |
.It |
| 72 |
.Cm X11Forwarding No yes |
| 73 |
.It |
| 74 |
.Cm PrintMotd No no |
| 75 |
.It |
| 76 |
.Cm AcceptEnv No LANG LC_* COLORTERM NO_COLOR |
| 77 |
.It |
| 78 |
.Cm Subsystem No sftp /usr/lib/openssh/sftp-server |
| 79 |
.It |
| 80 |
.Cm UsePAM No yes |
| 81 |
.El |
| 82 |
.Pp |
| 83 |
.Pa /etc/ssh/sshd_config.d/*.conf |
| 84 |
files are included at the start of the configuration file, so options set |
| 85 |
there will override those in |
| 86 |
.Pa /etc/ssh/sshd_config. |
| 87 |
.Pp |
| 88 |
The possible |
| 89 |
keywords and their meanings are as follows (note that |
| 90 |
keywords are case-insensitive and arguments are case-sensitive): |
| 91 |
.Bl -tag -width Ds |
| 92 |
.It Cm AcceptEnv |
| 93 |
Specifies what environment variables sent by the client will be copied into |
| 94 |
the session's |
| 95 |
.Xr environ 7 . |
| 96 |
See |
| 97 |
.Cm SendEnv |
| 98 |
and |
| 99 |
.Cm SetEnv |
| 100 |
in |
| 101 |
.Xr ssh_config 5 |
| 102 |
for how to configure the client. |
| 103 |
The |
| 104 |
.Ev TERM |
| 105 |
environment variable is always accepted whenever the client |
| 106 |
requests a pseudo-terminal as it is required by the protocol. |
| 107 |
Variables are specified by name, which may contain the wildcard characters |
| 108 |
.Ql * |
| 109 |
and |
| 110 |
.Ql \&? . |
| 111 |
Multiple environment variables may be separated by whitespace or spread |
| 112 |
across multiple |
| 113 |
.Cm AcceptEnv |
| 114 |
directives. |
| 115 |
Be warned that some environment variables could be used to bypass restricted |
| 116 |
user environments. |
| 117 |
For this reason, care should be taken in the use of this directive. |
| 118 |
The default is not to accept any environment variables. |
| 119 |
.It Cm AddressFamily |
| 120 |
Specifies which address family should be used by |
| 121 |
.Xr sshd 8 . |
| 122 |
Valid arguments are |
| 123 |
.Cm any |
| 124 |
(the default), |
| 125 |
.Cm inet |
| 126 |
(use IPv4 only), or |
| 127 |
.Cm inet6 |
| 128 |
(use IPv6 only). |
| 129 |
.It Cm AllowAgentForwarding |
| 130 |
Specifies whether |
| 131 |
.Xr ssh-agent 1 |
| 132 |
forwarding is permitted. |
| 133 |
The default is |
| 134 |
.Cm yes . |
| 135 |
Note that disabling agent forwarding does not improve security |
| 136 |
unless users are also denied shell access, as they can always install |
| 137 |
their own forwarders. |
| 138 |
.It Cm AllowGroups |
| 139 |
This keyword can be followed by a list of group name patterns, separated |
| 140 |
by spaces. |
| 141 |
If specified, login is allowed only for users whose primary |
| 142 |
group or supplementary group list matches one of the patterns. |
| 143 |
Only group names are valid; a numerical group ID is not recognized. |
| 144 |
By default, login is allowed for all groups. |
| 145 |
.Cm AllowGroups |
| 146 |
is not consulted for groups matched by |
| 147 |
.Cm DenyGroups . |
| 148 |
.Pp |
| 149 |
See PATTERNS in |
| 150 |
.Xr ssh_config 5 |
| 151 |
for more information on patterns. |
| 152 |
This keyword may appear multiple times in |
| 153 |
.Nm |
| 154 |
with each instance appending to the list. |
| 155 |
.It Cm AllowStreamLocalForwarding |
| 156 |
Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted. |
| 157 |
The available options are |
| 158 |
.Cm yes |
| 159 |
(the default) |
| 160 |
or |
| 161 |
.Cm all |
| 162 |
to allow StreamLocal forwarding, |
| 163 |
.Cm no |
| 164 |
to prevent all StreamLocal forwarding, |
| 165 |
.Cm local |
| 166 |
to allow local (from the perspective of |
| 167 |
.Xr ssh 1 ) |
| 168 |
forwarding only or |
| 169 |
.Cm remote |
| 170 |
to allow remote forwarding only. |
| 171 |
Note that disabling StreamLocal forwarding does not improve security unless |
| 172 |
users are also denied shell access, as they can always install their |
| 173 |
own forwarders. |
| 174 |
.It Cm AllowTcpForwarding |
| 175 |
Specifies whether TCP forwarding is permitted. |
| 176 |
The available options are |
| 177 |
.Cm yes |
| 178 |
(the default) |
| 179 |
or |
| 180 |
.Cm all |
| 181 |
to allow TCP forwarding, |
| 182 |
.Cm no |
| 183 |
to prevent all TCP forwarding, |
| 184 |
.Cm local |
| 185 |
to allow local (from the perspective of |
| 186 |
.Xr ssh 1 ) |
| 187 |
forwarding only or |
| 188 |
.Cm remote |
| 189 |
to allow remote forwarding only. |
| 190 |
Note that disabling TCP forwarding does not improve security unless |
| 191 |
users are also denied shell access, as they can always install their |
| 192 |
own forwarders. |
| 193 |
.It Cm AllowUsers |
| 194 |
This keyword can be followed by a list of user name patterns, separated |
| 195 |
by spaces. |
| 196 |
If specified, login is allowed only for user names that |
| 197 |
match one of the patterns. |
| 198 |
Only user names are valid; a numerical user ID is not recognized. |
| 199 |
By default, login is allowed for all users. |
| 200 |
If the pattern takes the form USER@HOST then USER and HOST |
| 201 |
are separately checked, restricting logins to particular |
| 202 |
users from particular hosts. |
| 203 |
HOST criteria may additionally contain addresses to match in CIDR |
| 204 |
address/masklen format. |
| 205 |
.Cm AllowUsers |
| 206 |
is not consulted for users matched by |
| 207 |
.Cm DenyUsers . |
| 208 |
.Pp |
| 209 |
See PATTERNS in |
| 210 |
.Xr ssh_config 5 |
| 211 |
for more information on patterns. |
| 212 |
This keyword may appear multiple times in |
| 213 |
.Nm |
| 214 |
with each instance appending to the list. |
| 215 |
.It Cm AuthenticationMethods |
| 216 |
Specifies the authentication methods that must be successfully completed |
| 217 |
for a user to be granted access. |
| 218 |
This option must be followed by one or more lists of comma-separated |
| 219 |
authentication method names, or by the single string |
| 220 |
.Cm any |
| 221 |
to indicate the default behaviour of accepting any single authentication |
| 222 |
method. |
| 223 |
If the default is overridden, then successful authentication requires |
| 224 |
completion of every method in at least one of these lists. |
| 225 |
.Pp |
| 226 |
For example, |
| 227 |
.Qq publickey,password publickey,keyboard-interactive |
| 228 |
would require the user to complete public key authentication, followed by |
| 229 |
either password or keyboard interactive authentication. |
| 230 |
Only methods that are next in one or more lists are offered at each stage, |
| 231 |
so for this example it would not be possible to attempt password or |
| 232 |
keyboard-interactive authentication before public key. |
| 233 |
.Pp |
| 234 |
For keyboard interactive authentication it is also possible to |
| 235 |
restrict authentication to a specific device by appending a |
| 236 |
colon followed by the device identifier |
| 237 |
.Cm bsdauth |
| 238 |
or |
| 239 |
.Cm pam . |
| 240 |
depending on the server configuration. |
| 241 |
For example, |
| 242 |
.Qq keyboard-interactive:bsdauth |
| 243 |
would restrict keyboard interactive authentication to the |
| 244 |
.Cm bsdauth |
| 245 |
device. |
| 246 |
.Pp |
| 247 |
If the publickey method is listed more than once, |
| 248 |
.Xr sshd 8 |
| 249 |
verifies that keys that have been used successfully are not reused for |
| 250 |
subsequent authentications. |
| 251 |
For example, |
| 252 |
.Qq publickey,publickey |
| 253 |
requires successful authentication using two different public keys. |
| 254 |
.Pp |
| 255 |
Note that each authentication method listed should also be explicitly enabled |
| 256 |
in the configuration. |
| 257 |
.Pp |
| 258 |
The available authentication methods are: |
| 259 |
.Qq gssapi-with-mic , |
| 260 |
.Qq hostbased , |
| 261 |
.Qq keyboard-interactive , |
| 262 |
.Qq none |
| 263 |
(used for access to password-less accounts when |
| 264 |
.Cm PermitEmptyPasswords |
| 265 |
is enabled), |
| 266 |
.Qq password |
| 267 |
and |
| 268 |
.Qq publickey . |
| 269 |
.It Cm AuthorizedKeysCommand |
| 270 |
Specifies a program to be used to look up the user's public keys. |
| 271 |
The program must be owned by root, not writable by group or others and |
| 272 |
specified by an absolute path. |
| 273 |
Arguments to |
| 274 |
.Cm AuthorizedKeysCommand |
| 275 |
accept the tokens described in the |
| 276 |
.Sx TOKENS |
| 277 |
section. |
| 278 |
If no arguments are specified then the username of the target user is used. |
| 279 |
.Pp |
| 280 |
The program should produce on standard output zero or |
| 281 |
more lines of authorized_keys output (see |
| 282 |
.Cm AUTHORIZED_KEYS |
| 283 |
in |
| 284 |
.Xr sshd 8 ) . |
| 285 |
.Cm AuthorizedKeysCommand |
| 286 |
is tried after the usual |
| 287 |
.Cm AuthorizedKeysFile |
| 288 |
files and will not be executed if a matching key is found there. |
| 289 |
By default, no |
| 290 |
.Cm AuthorizedKeysCommand |
| 291 |
is run. |
| 292 |
This command is only executed for valid users. |
| 293 |
.It Cm AuthorizedKeysCommandUser |
| 294 |
Specifies the user under whose account the |
| 295 |
.Cm AuthorizedKeysCommand |
| 296 |
is run. |
| 297 |
It is recommended to use a dedicated user that has no other role on the host |
| 298 |
than running authorized keys commands. |
| 299 |
If |
| 300 |
.Cm AuthorizedKeysCommand |
| 301 |
is specified but |
| 302 |
.Cm AuthorizedKeysCommandUser |
| 303 |
is not, then |
| 304 |
.Xr sshd 8 |
| 305 |
will refuse to start. |
| 306 |
.It Cm AuthorizedKeysFile |
| 307 |
Specifies the file that contains the public keys used for user authentication. |
| 308 |
The format is described in the AUTHORIZED_KEYS FILE FORMAT section of |
| 309 |
.Xr sshd 8 . |
| 310 |
Arguments to |
| 311 |
.Cm AuthorizedKeysFile |
| 312 |
may include wildcards and accept the tokens described in the |
| 313 |
.Sx TOKENS |
| 314 |
section. |
| 315 |
After expansion, |
| 316 |
.Cm AuthorizedKeysFile |
| 317 |
is taken to be an absolute path or one relative to the user's home |
| 318 |
directory. |
| 319 |
Multiple files may be listed, separated by whitespace. |
| 320 |
Alternately this option may be set to |
| 321 |
.Cm none |
| 322 |
to skip checking for user keys in files. |
| 323 |
The default is |
| 324 |
.Qq .ssh/authorized_keys .ssh/authorized_keys2 . |
| 325 |
These files are only checked for valid users. |
| 326 |
.It Cm AuthorizedPrincipalsCommand |
| 327 |
Specifies a program to be used to generate the list of allowed |
| 328 |
certificate principals as per |
| 329 |
.Cm AuthorizedPrincipalsFile . |
| 330 |
The program must be owned by root, not writable by group or others and |
| 331 |
specified by an absolute path. |
| 332 |
Arguments to |
| 333 |
.Cm AuthorizedPrincipalsCommand |
| 334 |
accept the tokens described in the |
| 335 |
.Sx TOKENS |
| 336 |
section. |
| 337 |
If no arguments are specified then the username of the target user is used. |
| 338 |
.Pp |
| 339 |
The program should produce on standard output zero or |
| 340 |
more lines of |
| 341 |
.Cm AuthorizedPrincipalsFile |
| 342 |
output. |
| 343 |
If either |
| 344 |
.Cm AuthorizedPrincipalsCommand |
| 345 |
or |
| 346 |
.Cm AuthorizedPrincipalsFile |
| 347 |
is specified, then certificates offered by the client for authentication |
| 348 |
must contain a principal that is listed. |
| 349 |
By default, no |
| 350 |
.Cm AuthorizedPrincipalsCommand |
| 351 |
is run. |
| 352 |
This command is only executed for valid users. |
| 353 |
.It Cm AuthorizedPrincipalsCommandUser |
| 354 |
Specifies the user under whose account the |
| 355 |
.Cm AuthorizedPrincipalsCommand |
| 356 |
is run. |
| 357 |
It is recommended to use a dedicated user that has no other role on the host |
| 358 |
than running authorized principals commands. |
| 359 |
If |
| 360 |
.Cm AuthorizedPrincipalsCommand |
| 361 |
is specified but |
| 362 |
.Cm AuthorizedPrincipalsCommandUser |
| 363 |
is not, then |
| 364 |
.Xr sshd 8 |
| 365 |
will refuse to start. |
| 366 |
.It Cm AuthorizedPrincipalsFile |
| 367 |
Specifies a file that lists principal names that are accepted for |
| 368 |
certificate authentication. |
| 369 |
When using certificates signed by a key listed in |
| 370 |
.Cm TrustedUserCAKeys , |
| 371 |
this file lists names, one of which must appear in the certificate for it |
| 372 |
to be accepted for authentication. |
| 373 |
Names are listed one per line preceded by key options (as described in |
| 374 |
.Cm AUTHORIZED_KEYS FILE FORMAT |
| 375 |
in |
| 376 |
.Xr sshd 8 ) . |
| 377 |
Empty lines and comments starting with |
| 378 |
.Ql # |
| 379 |
are ignored. |
| 380 |
.Pp |
| 381 |
Arguments to |
| 382 |
.Cm AuthorizedPrincipalsFile |
| 383 |
may include wildcards and accept the tokens described in the |
| 384 |
.Sx TOKENS |
| 385 |
section. |
| 386 |
After expansion, |
| 387 |
.Cm AuthorizedPrincipalsFile |
| 388 |
is taken to be an absolute path or one relative to the user's home directory. |
| 389 |
The default is |
| 390 |
.Cm none , |
| 391 |
i.e. not to use a principals file \(en in this case, the username |
| 392 |
of the user must appear in a certificate's principals list for it to be |
| 393 |
accepted. |
| 394 |
This file is only checked for valid users. |
| 395 |
.Pp |
| 396 |
Note that |
| 397 |
.Cm AuthorizedPrincipalsFile |
| 398 |
is only used when authentication proceeds using a CA listed in |
| 399 |
.Cm TrustedUserCAKeys |
| 400 |
and is not consulted for certification authorities trusted via |
| 401 |
.Pa ~/.ssh/authorized_keys , |
| 402 |
though the |
| 403 |
.Cm principals= |
| 404 |
key option offers a similar facility (see |
| 405 |
.Xr sshd 8 |
| 406 |
for details). |
| 407 |
.It Cm Banner |
| 408 |
The contents of the specified file are sent to the remote user before |
| 409 |
authentication is allowed. |
| 410 |
If the argument is |
| 411 |
.Cm none |
| 412 |
then no banner is displayed. |
| 413 |
By default, no banner is displayed. |
| 414 |
.It Cm CASignatureAlgorithms |
| 415 |
Specifies which algorithms are allowed for signing of certificates |
| 416 |
by certificate authorities (CAs). |
| 417 |
The default is: |
| 418 |
.Bd -literal -offset indent |
| 419 |
ssh-ed25519,ecdsa-sha2-nistp256, |
| 420 |
ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
| 421 |
[email protected], |
| 422 |
[email protected], |
| 423 |
rsa-sha2-512,rsa-sha2-256 |
| 424 |
.Ed |
| 425 |
.Pp |
| 426 |
If the specified list begins with a |
| 427 |
.Sq + |
| 428 |
character, then the specified algorithms will be appended to the default set |
| 429 |
instead of replacing them. |
| 430 |
If the specified list begins with a |
| 431 |
.Sq - |
| 432 |
character, then the specified algorithms (including wildcards) will be removed |
| 433 |
from the default set instead of replacing them. |
| 434 |
.Pp |
| 435 |
Certificates signed using other algorithms will not be accepted for |
| 436 |
public key or host-based authentication. |
| 437 |
.It Cm ChannelTimeout |
| 438 |
Specifies whether and how quickly |
| 439 |
.Xr sshd 8 |
| 440 |
should close inactive channels. |
| 441 |
Timeouts are specified as one or more |
| 442 |
.Dq type=interval |
| 443 |
pairs separated by whitespace, where the |
| 444 |
.Dq type |
| 445 |
must be the special keyword |
| 446 |
.Dq global |
| 447 |
or a channel type name from the list below, optionally containing |
| 448 |
wildcard characters. |
| 449 |
.Pp |
| 450 |
The timeout value |
| 451 |
.Dq interval |
| 452 |
is specified in seconds or may use any of the units documented in the |
| 453 |
.Sx TIME FORMATS |
| 454 |
section. |
| 455 |
For example, |
| 456 |
.Dq session=5m |
| 457 |
would cause interactive sessions to terminate after five minutes of |
| 458 |
inactivity. |
| 459 |
Specifying a zero value disables the inactivity timeout. |
| 460 |
.Pp |
| 461 |
The special timeout |
| 462 |
.Dq global |
| 463 |
applies to all active channels, taken together. |
| 464 |
Traffic on any active channel will reset the timeout, but when the timeout |
| 465 |
expires then all open channels will be closed. |
| 466 |
Note that this global timeout is not matched by wildcards and must be |
| 467 |
specified explicitly. |
| 468 |
.Pp |
| 469 |
The available channel type names include: |
| 470 |
.Bl -tag -width Ds |
| 471 |
.It Cm agent-connection |
| 472 |
Open connections to |
| 473 |
.Xr ssh-agent 1 . |
| 474 |
.It Cm direct-tcpip , Cm [email protected] |
| 475 |
Open TCP or Unix socket (respectively) connections that have |
| 476 |
been established from an |
| 477 |
.Xr ssh 1 |
| 478 |
local forwarding, i.e.\& |
| 479 |
.Cm LocalForward |
| 480 |
or |
| 481 |
.Cm DynamicForward . |
| 482 |
.It Cm forwarded-tcpip , Cm [email protected] |
| 483 |
Open TCP or Unix socket (respectively) connections that have been |
| 484 |
established to an |
| 485 |
.Xr sshd 8 |
| 486 |
listening on behalf of an |
| 487 |
.Xr ssh 1 |
| 488 |
remote forwarding, i.e.\& |
| 489 |
.Cm RemoteForward . |
| 490 |
.It Cm session |
| 491 |
The interactive main session, including shell session, command execution, |
| 492 |
.Xr scp 1 , |
| 493 |
.Xr sftp 1 , |
| 494 |
etc. |
| 495 |
.It Cm tun-connection |
| 496 |
Open |
| 497 |
.Cm TunnelForward |
| 498 |
connections. |
| 499 |
.It Cm x11-connection |
| 500 |
Open X11 forwarding sessions. |
| 501 |
.El |
| 502 |
.Pp |
| 503 |
Note that in all the above cases, terminating an inactive session does not |
| 504 |
guarantee to remove all resources associated with the session, e.g. shell |
| 505 |
processes or X11 clients relating to the session may continue to execute. |
| 506 |
.Pp |
| 507 |
Moreover, terminating an inactive channel or session does not necessarily |
| 508 |
close the SSH connection, nor does it prevent a client from |
| 509 |
requesting another channel of the same type. |
| 510 |
In particular, expiring an inactive forwarding session does not prevent |
| 511 |
another identical forwarding from being subsequently created. |
| 512 |
.Pp |
| 513 |
The default is not to expire channels of any type for inactivity. |
| 514 |
.It Cm ChrootDirectory |
| 515 |
Specifies the pathname of a directory to |
| 516 |
.Xr chroot 2 |
| 517 |
to after authentication. |
| 518 |
At session startup |
| 519 |
.Xr sshd 8 |
| 520 |
checks that all components of the pathname are root-owned directories |
| 521 |
which are not writable by group or others. |
| 522 |
After the chroot, |
| 523 |
.Xr sshd 8 |
| 524 |
changes the working directory to the user's home directory. |
| 525 |
Arguments to |
| 526 |
.Cm ChrootDirectory |
| 527 |
accept the tokens described in the |
| 528 |
.Sx TOKENS |
| 529 |
section. |
| 530 |
.Pp |
| 531 |
The |
| 532 |
.Cm ChrootDirectory |
| 533 |
must contain the necessary files and directories to support the |
| 534 |
user's session. |
| 535 |
For an interactive session this requires at least a shell, typically |
| 536 |
.Xr sh 1 , |
| 537 |
and basic |
| 538 |
.Pa /dev |
| 539 |
nodes such as |
| 540 |
.Xr null 4 , |
| 541 |
.Xr zero 4 , |
| 542 |
.Xr stdin 4 , |
| 543 |
.Xr stdout 4 , |
| 544 |
.Xr stderr 4 , |
| 545 |
and |
| 546 |
.Xr tty 4 |
| 547 |
devices. |
| 548 |
For file transfer sessions using SFTP |
| 549 |
no additional configuration of the environment is necessary if the in-process |
| 550 |
sftp-server is used, |
| 551 |
though sessions which use logging may require |
| 552 |
.Pa /dev/log |
| 553 |
inside the chroot directory on some operating systems (see |
| 554 |
.Xr sftp-server 8 |
| 555 |
for details). |
| 556 |
.Pp |
| 557 |
For safety, it is very important that the directory hierarchy be |
| 558 |
prevented from modification by other processes on the system (especially |
| 559 |
those outside the jail). |
| 560 |
Misconfiguration can lead to unsafe environments which |
| 561 |
.Xr sshd 8 |
| 562 |
cannot detect. |
| 563 |
.Pp |
| 564 |
The default is |
| 565 |
.Cm none , |
| 566 |
indicating not to |
| 567 |
.Xr chroot 2 . |
| 568 |
.It Cm Ciphers |
| 569 |
Specifies the ciphers allowed. |
| 570 |
Multiple ciphers must be comma-separated. |
| 571 |
If the specified list begins with a |
| 572 |
.Sq + |
| 573 |
character, then the specified ciphers will be appended to the default set |
| 574 |
instead of replacing them. |
| 575 |
If the specified list begins with a |
| 576 |
.Sq - |
| 577 |
character, then the specified ciphers (including wildcards) will be removed |
| 578 |
from the default set instead of replacing them. |
| 579 |
If the specified list begins with a |
| 580 |
.Sq ^ |
| 581 |
character, then the specified ciphers will be placed at the head of the |
| 582 |
default set. |
| 583 |
.Pp |
| 584 |
The supported ciphers are: |
| 585 |
.Pp |
| 586 |
.Bl -item -compact -offset indent |
| 587 |
.It |
| 588 |
3des-cbc |
| 589 |
.It |
| 590 |
aes128-cbc |
| 591 |
.It |
| 592 |
aes192-cbc |
| 593 |
.It |
| 594 |
aes256-cbc |
| 595 |
.It |
| 596 |
aes128-ctr |
| 597 |
.It |
| 598 |
aes192-ctr |
| 599 |
.It |
| 600 |
aes256-ctr |
| 601 |
.It |
| 602 |
[email protected] |
| 603 |
.It |
| 604 |
[email protected] |
| 605 |
.It |
| 606 |
[email protected] |
| 607 |
.El |
| 608 |
.Pp |
| 609 |
The default is: |
| 610 |
.Bd -literal -offset indent |
| 611 |
[email protected], |
| 612 |
[email protected],[email protected], |
| 613 |
aes128-ctr,aes192-ctr,aes256-ctr |
| 614 |
.Ed |
| 615 |
.Pp |
| 616 |
The list of available ciphers may also be obtained using |
| 617 |
.Qq ssh -Q cipher . |
| 618 |
.It Cm ClientAliveCountMax |
| 619 |
Sets the number of client alive messages which may be sent without |
| 620 |
.Xr sshd 8 |
| 621 |
receiving any messages back from the client. |
| 622 |
If this threshold is reached while client alive messages are being sent, |
| 623 |
sshd will disconnect the client, terminating the session. |
| 624 |
It is important to note that the use of client alive messages is very |
| 625 |
different from |
| 626 |
.Cm TCPKeepAlive . |
| 627 |
The client alive messages are sent through the encrypted channel |
| 628 |
and therefore will not be spoofable. |
| 629 |
The TCP keepalive option enabled by |
| 630 |
.Cm TCPKeepAlive |
| 631 |
is spoofable. |
| 632 |
The client alive mechanism is valuable when the client or |
| 633 |
server depend on knowing when a connection has become unresponsive. |
| 634 |
.Pp |
| 635 |
The default value is 3. |
| 636 |
If |
| 637 |
.Cm ClientAliveInterval |
| 638 |
is set to 15, and |
| 639 |
.Cm ClientAliveCountMax |
| 640 |
is left at the default, unresponsive SSH clients |
| 641 |
will be disconnected after approximately 45 seconds. |
| 642 |
Setting a zero |
| 643 |
.Cm ClientAliveCountMax |
| 644 |
disables connection termination. |
| 645 |
.It Cm ClientAliveInterval |
| 646 |
Sets a timeout interval in seconds after which if no data has been received |
| 647 |
from the client, |
| 648 |
.Xr sshd 8 |
| 649 |
will send a message through the encrypted |
| 650 |
channel to request a response from the client. |
| 651 |
The default |
| 652 |
is 0, indicating that these messages will not be sent to the client. |
| 653 |
.It Cm Compression |
| 654 |
Specifies whether compression is enabled after |
| 655 |
the user has authenticated successfully. |
| 656 |
The argument must be |
| 657 |
.Cm yes , |
| 658 |
.Cm delayed |
| 659 |
(a legacy synonym for |
| 660 |
.Cm yes ) |
| 661 |
or |
| 662 |
.Cm no . |
| 663 |
The default is |
| 664 |
.Cm yes . |
| 665 |
.It Cm DebianBanner |
| 666 |
Specifies whether the distribution-specified extra version suffix is |
| 667 |
included during initial protocol handshake. |
| 668 |
The default is |
| 669 |
.Cm yes . |
| 670 |
.It Cm DenyGroups |
| 671 |
This keyword can be followed by a list of group name patterns, separated |
| 672 |
by spaces. |
| 673 |
Login is disallowed for users whose primary group or supplementary |
| 674 |
group list matches one of the patterns. |
| 675 |
Only group names are valid; a numerical group ID is not recognized. |
| 676 |
By default, login is allowed for all groups. |
| 677 |
.Cm AllowGroups |
| 678 |
is not consulted for groups matched by |
| 679 |
.Cm DenyGroups . |
| 680 |
.Pp |
| 681 |
See PATTERNS in |
| 682 |
.Xr ssh_config 5 |
| 683 |
for more information on patterns. |
| 684 |
This keyword may appear multiple times in |
| 685 |
.Nm |
| 686 |
with each instance appending to the list. |
| 687 |
.It Cm DenyUsers |
| 688 |
This keyword can be followed by a list of user name patterns, separated |
| 689 |
by spaces. |
| 690 |
Login is disallowed for user names that match one of the patterns. |
| 691 |
Only user names are valid; a numerical user ID is not recognized. |
| 692 |
By default, login is allowed for all users. |
| 693 |
If the pattern takes the form USER@HOST then USER and HOST |
| 694 |
are separately checked, restricting logins to particular |
| 695 |
users from particular hosts. |
| 696 |
HOST criteria may additionally contain addresses to match in CIDR |
| 697 |
address/masklen format. |
| 698 |
.Cm AllowUsers |
| 699 |
is not consulted for users matched by |
| 700 |
.Cm DenyUsers . |
| 701 |
.Pp |
| 702 |
See PATTERNS in |
| 703 |
.Xr ssh_config 5 |
| 704 |
for more information on patterns. |
| 705 |
This keyword may appear multiple times in |
| 706 |
.Nm |
| 707 |
with each instance appending to the list. |
| 708 |
.It Cm DisableForwarding |
| 709 |
Disables all forwarding features, including X11, |
| 710 |
.Xr ssh-agent 1 , |
| 711 |
TCP and StreamLocal. |
| 712 |
This option overrides all other forwarding-related options and may |
| 713 |
simplify restricted configurations. |
| 714 |
.It Cm ExposeAuthInfo |
| 715 |
Writes a temporary file containing a list of authentication methods and |
| 716 |
public credentials (e.g. keys) used to authenticate the user. |
| 717 |
The location of the file is exposed to the user session through the |
| 718 |
.Ev SSH_USER_AUTH |
| 719 |
environment variable. |
| 720 |
The default is |
| 721 |
.Cm no . |
| 722 |
.It Cm FingerprintHash |
| 723 |
Specifies the hash algorithm used when logging key fingerprints. |
| 724 |
Valid options are: |
| 725 |
.Cm md5 |
| 726 |
and |
| 727 |
.Cm sha256 . |
| 728 |
The default is |
| 729 |
.Cm sha256 . |
| 730 |
.It Cm ForceCommand |
| 731 |
Forces the execution of the command specified by |
| 732 |
.Cm ForceCommand , |
| 733 |
ignoring any command supplied by the client and |
| 734 |
.Pa ~/.ssh/rc |
| 735 |
if present. |
| 736 |
The command is invoked by using the user's login shell with the -c option. |
| 737 |
This applies to shell, command, or subsystem execution. |
| 738 |
It is most useful inside a |
| 739 |
.Cm Match |
| 740 |
block. |
| 741 |
The command originally supplied by the client is available in the |
| 742 |
.Ev SSH_ORIGINAL_COMMAND |
| 743 |
environment variable. |
| 744 |
Specifying a command of |
| 745 |
.Cm internal-sftp |
| 746 |
will force the use of an in-process SFTP server that requires no support |
| 747 |
files when used with |
| 748 |
.Cm ChrootDirectory . |
| 749 |
The default is |
| 750 |
.Cm none . |
| 751 |
.Pp |
| 752 |
This directive does not limit other kinds of access that a |
| 753 |
client may request via their connection, such as TCP, agent, socket or |
| 754 |
X11 forwarding. |
| 755 |
If these are not desired, then they must be explicitly disabled, either |
| 756 |
individually via their respective options or all together using the |
| 757 |
.Cm DisableForwarding |
| 758 |
option. |
| 759 |
.It Cm GatewayPorts |
| 760 |
Specifies whether remote hosts are allowed to connect to ports |
| 761 |
forwarded for the client. |
| 762 |
By default, |
| 763 |
.Xr sshd 8 |
| 764 |
binds remote port forwardings to the loopback address. |
| 765 |
This prevents other remote hosts from connecting to forwarded ports. |
| 766 |
.Cm GatewayPorts |
| 767 |
can be used to specify that sshd |
| 768 |
should allow remote port forwardings to bind to non-loopback addresses, thus |
| 769 |
allowing other hosts to connect. |
| 770 |
The argument may be |
| 771 |
.Cm no |
| 772 |
to force remote port forwardings to be available to the local host only, |
| 773 |
.Cm yes |
| 774 |
to force remote port forwardings to bind to the wildcard address, or |
| 775 |
.Cm clientspecified |
| 776 |
to allow the client to select the address to which the forwarding is bound. |
| 777 |
The default is |
| 778 |
.Cm no . |
| 779 |
.It Cm GSSAPIAuthentication |
| 780 |
Specifies whether user authentication based on GSSAPI is allowed. |
| 781 |
The default is |
| 782 |
.Cm no . |
| 783 |
.It Cm GSSAPICleanupCredentials |
| 784 |
Specifies whether to automatically destroy the user's credentials cache |
| 785 |
on logout. |
| 786 |
The default is |
| 787 |
.Cm yes . |
| 788 |
.It Cm GSSAPIDelegateCredentials |
| 789 |
Accept delegated credentials on the server side. |
| 790 |
The default is |
| 791 |
.Cm yes . |
| 792 |
.It Cm GSSAPIKeyExchange |
| 793 |
Specifies whether key exchange based on GSSAPI is allowed. GSSAPI key exchange |
| 794 |
doesn't rely on ssh keys to verify host identity. |
| 795 |
The default is |
| 796 |
.Cm no . |
| 797 |
.It Cm GSSAPIStrictAcceptorCheck |
| 798 |
Determines whether to be strict about the identity of the GSSAPI acceptor |
| 799 |
a client authenticates against. |
| 800 |
If set to |
| 801 |
.Cm yes |
| 802 |
then the client must authenticate against the host |
| 803 |
service on the current hostname. |
| 804 |
If set to |
| 805 |
.Cm no |
| 806 |
then the client may authenticate against any service key stored in the |
| 807 |
machine's default store. |
| 808 |
This facility is provided to assist with operation on multi homed machines. |
| 809 |
The default is |
| 810 |
.Cm yes . |
| 811 |
.It Cm GSSAPIStoreCredentialsOnRekey |
| 812 |
Controls whether the user's GSSAPI credentials should be updated following a |
| 813 |
successful connection rekeying. This option can be used to accepted renewed |
| 814 |
or updated credentials from a compatible client. The default is |
| 815 |
.Dq no . |
| 816 |
.Pp |
| 817 |
For this to work |
| 818 |
.Cm GSSAPIKeyExchange |
| 819 |
needs to be enabled in the server and also used by the client. |
| 820 |
.It Cm GSSAPIKexAlgorithms |
| 821 |
The list of key exchange algorithms that are accepted by GSSAPI |
| 822 |
key exchange. Possible values are |
| 823 |
.Bd -literal -offset 3n |
| 824 |
gss-gex-sha1-, |
| 825 |
gss-group1-sha1-, |
| 826 |
gss-group14-sha1-, |
| 827 |
gss-group14-sha256-, |
| 828 |
gss-group16-sha512-, |
| 829 |
gss-nistp256-sha256-, |
| 830 |
gss-curve25519-sha256- |
| 831 |
.Ed |
| 832 |
.Pp |
| 833 |
The default is |
| 834 |
.Dq gss-group14-sha256-,gss-group16-sha512-,gss-nistp256-sha256-,gss-curve25519-sha256- . |
| 835 |
This option only applies to connections using GSSAPI. |
| 836 |
.It Cm HostbasedAcceptedAlgorithms |
| 837 |
Specifies the signature algorithms that will be accepted for hostbased |
| 838 |
authentication as a list of comma-separated patterns. |
| 839 |
Alternately if the specified list begins with a |
| 840 |
.Sq + |
| 841 |
character, then the specified signature algorithms will be appended to |
| 842 |
the default set instead of replacing them. |
| 843 |
If the specified list begins with a |
| 844 |
.Sq - |
| 845 |
character, then the specified signature algorithms (including wildcards) |
| 846 |
will be removed from the default set instead of replacing them. |
| 847 |
If the specified list begins with a |
| 848 |
.Sq ^ |
| 849 |
character, then the specified signature algorithms will be placed at |
| 850 |
the head of the default set. |
| 851 |
The default for this option is: |
| 852 |
.Bd -literal -offset 3n |
| 853 |
[email protected], |
| 854 |
[email protected], |
| 855 |
[email protected], |
| 856 |
[email protected], |
| 857 |
[email protected], |
| 858 |
[email protected], |
| 859 |
[email protected], |
| 860 |
[email protected], |
| 861 |
[email protected], |
| 862 |
ssh-ed25519, |
| 863 |
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
| 864 |
[email protected], |
| 865 |
[email protected], |
| 866 |
[email protected], |
| 867 |
rsa-sha2-512,rsa-sha2-256 |
| 868 |
.Ed |
| 869 |
.Pp |
| 870 |
The list of available signature algorithms may also be obtained using |
| 871 |
.Qq ssh -Q HostbasedAcceptedAlgorithms . |
| 872 |
This was formerly named HostbasedAcceptedKeyTypes. |
| 873 |
.It Cm HostbasedAuthentication |
| 874 |
Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 875 |
with successful public key client host authentication is allowed |
| 876 |
(host-based authentication). |
| 877 |
The default is |
| 878 |
.Cm no . |
| 879 |
.It Cm HostbasedUsesNameFromPacketOnly |
| 880 |
Specifies whether or not the server will attempt to perform a reverse |
| 881 |
name lookup when matching the name in the |
| 882 |
.Pa ~/.shosts , |
| 883 |
.Pa ~/.rhosts , |
| 884 |
and |
| 885 |
.Pa /etc/hosts.equiv |
| 886 |
files during |
| 887 |
.Cm HostbasedAuthentication . |
| 888 |
A setting of |
| 889 |
.Cm yes |
| 890 |
means that |
| 891 |
.Xr sshd 8 |
| 892 |
uses the name supplied by the client rather than |
| 893 |
attempting to resolve the name from the TCP connection itself. |
| 894 |
The default is |
| 895 |
.Cm no . |
| 896 |
.It Cm HostCertificate |
| 897 |
Specifies a file containing a public host certificate. |
| 898 |
The certificate's public key must match a private host key already specified |
| 899 |
by |
| 900 |
.Cm HostKey . |
| 901 |
The default behaviour of |
| 902 |
.Xr sshd 8 |
| 903 |
is not to load any certificates. |
| 904 |
.It Cm HostKey |
| 905 |
Specifies a file containing a private host key |
| 906 |
used by SSH. |
| 907 |
The defaults are |
| 908 |
.Pa /etc/ssh/ssh_host_ecdsa_key , |
| 909 |
.Pa /etc/ssh/ssh_host_ed25519_key |
| 910 |
and |
| 911 |
.Pa /etc/ssh/ssh_host_rsa_key . |
| 912 |
.Pp |
| 913 |
Note that |
| 914 |
.Xr sshd 8 |
| 915 |
will refuse to use a file if it is group/world-accessible |
| 916 |
and that the |
| 917 |
.Cm HostKeyAlgorithms |
| 918 |
option restricts which of the keys are actually used by |
| 919 |
.Xr sshd 8 . |
| 920 |
.Pp |
| 921 |
It is possible to have multiple host key files. |
| 922 |
It is also possible to specify public host key files instead. |
| 923 |
In this case operations on the private key will be delegated |
| 924 |
to an |
| 925 |
.Xr ssh-agent 1 . |
| 926 |
.It Cm HostKeyAgent |
| 927 |
Identifies the UNIX-domain socket used to communicate |
| 928 |
with an agent that has access to the private host keys. |
| 929 |
If the string |
| 930 |
.Qq SSH_AUTH_SOCK |
| 931 |
is specified, the location of the socket will be read from the |
| 932 |
.Ev SSH_AUTH_SOCK |
| 933 |
environment variable. |
| 934 |
.It Cm HostKeyAlgorithms |
| 935 |
Specifies the host key signature algorithms |
| 936 |
that the server offers. |
| 937 |
The default for this option is: |
| 938 |
.Bd -literal -offset 3n |
| 939 |
[email protected], |
| 940 |
[email protected], |
| 941 |
[email protected], |
| 942 |
[email protected], |
| 943 |
[email protected], |
| 944 |
[email protected], |
| 945 |
[email protected], |
| 946 |
[email protected], |
| 947 |
[email protected], |
| 948 |
ssh-ed25519, |
| 949 |
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
| 950 |
[email protected], |
| 951 |
[email protected], |
| 952 |
[email protected], |
| 953 |
rsa-sha2-512,rsa-sha2-256 |
| 954 |
.Ed |
| 955 |
.Pp |
| 956 |
The list of available signature algorithms may also be obtained using |
| 957 |
.Qq ssh -Q HostKeyAlgorithms . |
| 958 |
.It Cm IgnoreRhosts |
| 959 |
Specifies whether to ignore per-user |
| 960 |
.Pa .rhosts |
| 961 |
and |
| 962 |
.Pa .shosts |
| 963 |
files during |
| 964 |
.Cm HostbasedAuthentication . |
| 965 |
The system-wide |
| 966 |
.Pa /etc/hosts.equiv |
| 967 |
and |
| 968 |
.Pa /etc/ssh/shosts.equiv |
| 969 |
are still used regardless of this setting. |
| 970 |
.Pp |
| 971 |
Accepted values are |
| 972 |
.Cm yes |
| 973 |
(the default) to ignore all per-user files, |
| 974 |
.Cm shosts-only |
| 975 |
to allow the use of |
| 976 |
.Pa .shosts |
| 977 |
but to ignore |
| 978 |
.Pa .rhosts |
| 979 |
or |
| 980 |
.Cm no |
| 981 |
to allow both |
| 982 |
.Pa .shosts |
| 983 |
and |
| 984 |
.Pa rhosts . |
| 985 |
.It Cm IgnoreUserKnownHosts |
| 986 |
Specifies whether |
| 987 |
.Xr sshd 8 |
| 988 |
should ignore the user's |
| 989 |
.Pa ~/.ssh/known_hosts |
| 990 |
during |
| 991 |
.Cm HostbasedAuthentication |
| 992 |
and use only the system-wide known hosts file |
| 993 |
.Pa /etc/ssh/ssh_known_hosts . |
| 994 |
The default is |
| 995 |
.Dq no . |
| 996 |
.It Cm Include |
| 997 |
Include the specified configuration file(s). |
| 998 |
Multiple pathnames may be specified and each pathname may contain |
| 999 |
.Xr glob 7 |
| 1000 |
wildcards that will be expanded and processed in lexical order. |
| 1001 |
Files without absolute paths are assumed to be in |
| 1002 |
.Pa /etc/ssh . |
| 1003 |
An |
| 1004 |
.Cm Include |
| 1005 |
directive may appear inside a |
| 1006 |
.Cm Match |
| 1007 |
block |
| 1008 |
to perform conditional inclusion. |
| 1009 |
.It Cm IPQoS |
| 1010 |
Specifies the |
| 1011 |
.Em Differentiated Services Field Codepoint Pq DSCP |
| 1012 |
value for the connection. |
| 1013 |
Accepted values are |
| 1014 |
.Cm af11 , |
| 1015 |
.Cm af12 , |
| 1016 |
.Cm af13 , |
| 1017 |
.Cm af21 , |
| 1018 |
.Cm af22 , |
| 1019 |
.Cm af23 , |
| 1020 |
.Cm af31 , |
| 1021 |
.Cm af32 , |
| 1022 |
.Cm af33 , |
| 1023 |
.Cm af41 , |
| 1024 |
.Cm af42 , |
| 1025 |
.Cm af43 , |
| 1026 |
.Cm cs0 , |
| 1027 |
.Cm cs1 , |
| 1028 |
.Cm cs2 , |
| 1029 |
.Cm cs3 , |
| 1030 |
.Cm cs4 , |
| 1031 |
.Cm cs5 , |
| 1032 |
.Cm cs6 , |
| 1033 |
.Cm cs7 , |
| 1034 |
.Cm ef , |
| 1035 |
.Cm le , |
| 1036 |
a numeric value, or |
| 1037 |
.Cm none |
| 1038 |
to use the operating system default. |
| 1039 |
This option may take one or two arguments, separated by whitespace. |
| 1040 |
If one argument is specified, it is used as the packet class unconditionally. |
| 1041 |
If two values are specified, the first is automatically selected for |
| 1042 |
interactive sessions and the second for non-interactive sessions. |
| 1043 |
The default is |
| 1044 |
.Cm ef |
| 1045 |
(Expedited Forwarding) |
| 1046 |
for interactive sessions and |
| 1047 |
.Cm none |
| 1048 |
(the operating system default) |
| 1049 |
for non-interactive sessions. |
| 1050 |
.It Cm KbdInteractiveAuthentication |
| 1051 |
Specifies whether to allow keyboard-interactive authentication. |
| 1052 |
The default is |
| 1053 |
.Cm yes . |
| 1054 |
The argument to this keyword must be |
| 1055 |
.Cm yes |
| 1056 |
or |
| 1057 |
.Cm no . |
| 1058 |
.Cm ChallengeResponseAuthentication |
| 1059 |
is a deprecated alias for this. |
| 1060 |
.It Cm KerberosAuthentication |
| 1061 |
Specifies whether the password provided by the user for |
| 1062 |
.Cm PasswordAuthentication |
| 1063 |
will be validated through the Kerberos KDC. |
| 1064 |
To use this option, the server needs a |
| 1065 |
Kerberos servtab which allows the verification of the KDC's identity. |
| 1066 |
The default is |
| 1067 |
.Cm no . |
| 1068 |
.It Cm KerberosGetAFSToken |
| 1069 |
If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire |
| 1070 |
an AFS token before accessing the user's home directory. |
| 1071 |
The default is |
| 1072 |
.Cm no . |
| 1073 |
.It Cm KerberosOrLocalPasswd |
| 1074 |
If password authentication through Kerberos fails then |
| 1075 |
the password will be validated via any additional local mechanism |
| 1076 |
such as |
| 1077 |
.Pa /etc/passwd . |
| 1078 |
The default is |
| 1079 |
.Cm yes . |
| 1080 |
.It Cm KerberosTicketCleanup |
| 1081 |
Specifies whether to automatically destroy the user's ticket cache |
| 1082 |
file on logout. |
| 1083 |
The default is |
| 1084 |
.Cm yes . |
| 1085 |
.It Cm KexAlgorithms |
| 1086 |
Specifies the permitted KEX (Key Exchange) algorithms that the server will |
| 1087 |
offer to clients. |
| 1088 |
The ordering of this list is not important, as the client specifies the |
| 1089 |
preference order. |
| 1090 |
Multiple algorithms must be comma-separated. |
| 1091 |
.Pp |
| 1092 |
If the specified list begins with a |
| 1093 |
.Sq + |
| 1094 |
character, then the specified algorithms will be appended to the default set |
| 1095 |
instead of replacing them. |
| 1096 |
If the specified list begins with a |
| 1097 |
.Sq - |
| 1098 |
character, then the specified algorithms (including wildcards) will be removed |
| 1099 |
from the default set instead of replacing them. |
| 1100 |
If the specified list begins with a |
| 1101 |
.Sq ^ |
| 1102 |
character, then the specified algorithms will be placed at the head of the |
| 1103 |
default set. |
| 1104 |
.Pp |
| 1105 |
The supported algorithms are: |
| 1106 |
.Pp |
| 1107 |
.Bl -item -compact -offset indent |
| 1108 |
.It |
| 1109 |
curve25519-sha256 |
| 1110 |
.It |
| 1111 |
[email protected] |
| 1112 |
.It |
| 1113 |
diffie-hellman-group1-sha1 |
| 1114 |
.It |
| 1115 |
diffie-hellman-group14-sha1 |
| 1116 |
.It |
| 1117 |
diffie-hellman-group14-sha256 |
| 1118 |
.It |
| 1119 |
diffie-hellman-group16-sha512 |
| 1120 |
.It |
| 1121 |
diffie-hellman-group18-sha512 |
| 1122 |
.It |
| 1123 |
diffie-hellman-group-exchange-sha1 |
| 1124 |
.It |
| 1125 |
diffie-hellman-group-exchange-sha256 |
| 1126 |
.It |
| 1127 |
ecdh-sha2-nistp256 |
| 1128 |
.It |
| 1129 |
ecdh-sha2-nistp384 |
| 1130 |
.It |
| 1131 |
ecdh-sha2-nistp521 |
| 1132 |
.It |
| 1133 |
mlkem768x25519-sha256 |
| 1134 |
.It |
| 1135 |
sntrup761x25519-sha512 |
| 1136 |
.It |
| 1137 |
[email protected] |
| 1138 |
.El |
| 1139 |
.Pp |
| 1140 |
The default is: |
| 1141 |
.Bd -literal -offset indent |
| 1142 |
mlkem768x25519-sha256, |
| 1143 |
sntrup761x25519-sha512,[email protected], |
| 1144 |
curve25519-sha256,[email protected], |
| 1145 |
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521 |
| 1146 |
.Ed |
| 1147 |
.Pp |
| 1148 |
The list of supported key exchange algorithms may also be obtained using |
| 1149 |
.Qq ssh -Q KexAlgorithms . |
| 1150 |
.It Cm ListenAddress |
| 1151 |
Specifies the local addresses |
| 1152 |
.Xr sshd 8 |
| 1153 |
should listen on. |
| 1154 |
The following forms may be used: |
| 1155 |
.Pp |
| 1156 |
.Bl -item -offset indent -compact |
| 1157 |
.It |
| 1158 |
.Cm ListenAddress |
| 1159 |
.Sm off |
| 1160 |
.Ar hostname | address |
| 1161 |
.Sm on |
| 1162 |
.Op Cm rdomain Ar domain |
| 1163 |
.It |
| 1164 |
.Cm ListenAddress |
| 1165 |
.Sm off |
| 1166 |
.Ar hostname : port |
| 1167 |
.Sm on |
| 1168 |
.Op Cm rdomain Ar domain |
| 1169 |
.It |
| 1170 |
.Cm ListenAddress |
| 1171 |
.Sm off |
| 1172 |
.Ar IPv4_address : port |
| 1173 |
.Sm on |
| 1174 |
.Op Cm rdomain Ar domain |
| 1175 |
.It |
| 1176 |
.Cm ListenAddress |
| 1177 |
.Sm off |
| 1178 |
.Oo Ar hostname | address Oc : Ar port |
| 1179 |
.Sm on |
| 1180 |
.Op Cm rdomain Ar domain |
| 1181 |
.El |
| 1182 |
.Pp |
| 1183 |
The optional |
| 1184 |
.Cm rdomain |
| 1185 |
qualifier requests |
| 1186 |
.Xr sshd 8 |
| 1187 |
listen in an explicit routing domain. |
| 1188 |
If |
| 1189 |
.Ar port |
| 1190 |
is not specified, |
| 1191 |
sshd will listen on the address and all |
| 1192 |
.Cm Port |
| 1193 |
options specified. |
| 1194 |
The default is to listen on all local addresses on the current default |
| 1195 |
routing domain. |
| 1196 |
Multiple |
| 1197 |
.Cm ListenAddress |
| 1198 |
options are permitted. |
| 1199 |
.Pp |
| 1200 |
On Linux, routing domains are implemented using Virtual Routing and |
| 1201 |
Forwarding domains (VRFs); for more information, see |
| 1202 |
.Xr ip-vrf 8 . |
| 1203 |
.It Cm LoginGraceTime |
| 1204 |
The server disconnects after this time if the user has not |
| 1205 |
successfully logged in. |
| 1206 |
If the value is 0, there is no time limit. |
| 1207 |
The default is 120 seconds. |
| 1208 |
.It Cm LogLevel |
| 1209 |
Gives the verbosity level that is used when logging messages from |
| 1210 |
.Xr sshd 8 . |
| 1211 |
The possible values are: |
| 1212 |
QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
| 1213 |
The default is INFO. |
| 1214 |
DEBUG and DEBUG1 are equivalent. |
| 1215 |
DEBUG2 and DEBUG3 each specify higher levels of debugging output. |
| 1216 |
Logging with a DEBUG level violates the privacy of users and is not recommended. |
| 1217 |
.It Cm LogVerbose |
| 1218 |
Specify one or more overrides to |
| 1219 |
.Cm LogLevel . |
| 1220 |
An override consists of one or more pattern lists that matches the |
| 1221 |
source file, function and line number to force detailed logging for. |
| 1222 |
For example, an override pattern of: |
| 1223 |
.Bd -literal -offset indent |
| 1224 |
kex.c:*:1000,*:kex_exchange_identification():*,packet.c:* |
| 1225 |
.Ed |
| 1226 |
.Pp |
| 1227 |
would enable detailed logging for line 1000 of |
| 1228 |
.Pa kex.c , |
| 1229 |
everything in the |
| 1230 |
.Fn kex_exchange_identification |
| 1231 |
function, and all code in the |
| 1232 |
.Pa packet.c |
| 1233 |
file. |
| 1234 |
This option is intended for debugging and no overrides are enabled by default. |
| 1235 |
.It Cm MACs |
| 1236 |
Specifies the available MAC (message authentication code) algorithms. |
| 1237 |
The MAC algorithm is used for data integrity protection. |
| 1238 |
Multiple algorithms must be comma-separated. |
| 1239 |
If the specified list begins with a |
| 1240 |
.Sq + |
| 1241 |
character, then the specified algorithms will be appended to the default set |
| 1242 |
instead of replacing them. |
| 1243 |
If the specified list begins with a |
| 1244 |
.Sq - |
| 1245 |
character, then the specified algorithms (including wildcards) will be removed |
| 1246 |
from the default set instead of replacing them. |
| 1247 |
If the specified list begins with a |
| 1248 |
.Sq ^ |
| 1249 |
character, then the specified algorithms will be placed at the head of the |
| 1250 |
default set. |
| 1251 |
.Pp |
| 1252 |
The algorithms that contain |
| 1253 |
.Qq -etm |
| 1254 |
calculate the MAC after encryption (encrypt-then-mac). |
| 1255 |
These are considered safer and their use recommended. |
| 1256 |
The supported MACs are: |
| 1257 |
.Pp |
| 1258 |
.Bl -item -compact -offset indent |
| 1259 |
.It |
| 1260 |
hmac-md5 |
| 1261 |
.It |
| 1262 |
hmac-md5-96 |
| 1263 |
.It |
| 1264 |
hmac-sha1 |
| 1265 |
.It |
| 1266 |
hmac-sha1-96 |
| 1267 |
.It |
| 1268 |
hmac-sha2-256 |
| 1269 |
.It |
| 1270 |
hmac-sha2-512 |
| 1271 |
.It |
| 1272 |
[email protected] |
| 1273 |
.It |
| 1274 |
[email protected] |
| 1275 |
.It |
| 1276 |
[email protected] |
| 1277 |
.It |
| 1278 |
[email protected] |
| 1279 |
.It |
| 1280 |
[email protected] |
| 1281 |
.It |
| 1282 |
[email protected] |
| 1283 |
.It |
| 1284 |
[email protected] |
| 1285 |
.It |
| 1286 |
[email protected] |
| 1287 |
.It |
| 1288 |
[email protected] |
| 1289 |
.It |
| 1290 |
[email protected] |
| 1291 |
.El |
| 1292 |
.Pp |
| 1293 |
The default is: |
| 1294 |
.Bd -literal -offset indent |
| 1295 |
[email protected],[email protected], |
| 1296 |
[email protected],[email protected], |
| 1297 |
[email protected], |
| 1298 |
[email protected],[email protected], |
| 1299 |
hmac-sha2-256,hmac-sha2-512,hmac-sha1 |
| 1300 |
.Ed |
| 1301 |
.Pp |
| 1302 |
The list of available MAC algorithms may also be obtained using |
| 1303 |
.Qq ssh -Q mac . |
| 1304 |
.It Cm Match |
| 1305 |
Introduces a conditional block. |
| 1306 |
If all of the criteria on the |
| 1307 |
.Cm Match |
| 1308 |
line are satisfied, the keywords on the following lines override those |
| 1309 |
set in the global section of the config file, until either another |
| 1310 |
.Cm Match |
| 1311 |
line or the end of the file. |
| 1312 |
If a keyword appears in multiple |
| 1313 |
.Cm Match |
| 1314 |
blocks that are satisfied, only the first instance of the keyword is |
| 1315 |
applied. |
| 1316 |
.Pp |
| 1317 |
The arguments to |
| 1318 |
.Cm Match |
| 1319 |
are one or more criteria-pattern pairs or one of the single token criteria: |
| 1320 |
.Cm All , |
| 1321 |
which matches all criteria, or |
| 1322 |
.Cm Invalid-User , |
| 1323 |
which matches when the requested user-name does not match any known account. |
| 1324 |
The available criteria are |
| 1325 |
.Cm User , |
| 1326 |
.Cm Group , |
| 1327 |
.Cm Host , |
| 1328 |
.Cm LocalAddress , |
| 1329 |
.Cm LocalPort , |
| 1330 |
.Cm Version , |
| 1331 |
.Cm RDomain , |
| 1332 |
and |
| 1333 |
.Cm Address |
| 1334 |
(with |
| 1335 |
.Cm RDomain |
| 1336 |
representing the routing domain on which the connection was received; see |
| 1337 |
.Xr ip-vrf 8 ) . |
| 1338 |
.Pp |
| 1339 |
The match patterns may consist of single entries or comma-separated |
| 1340 |
lists and may use the wildcard and negation operators described in the |
| 1341 |
.Sx PATTERNS |
| 1342 |
section of |
| 1343 |
.Xr ssh_config 5 . |
| 1344 |
.Pp |
| 1345 |
The patterns in an |
| 1346 |
.Cm Address |
| 1347 |
criteria may additionally contain addresses to match in CIDR |
| 1348 |
address/masklen format, |
| 1349 |
such as 192.0.2.0/24 or 2001:db8::/32. |
| 1350 |
Note that the mask length provided must be consistent with the address - |
| 1351 |
it is an error to specify a mask length that is too long for the address |
| 1352 |
or one with bits set in this host portion of the address. |
| 1353 |
For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. |
| 1354 |
.Pp |
| 1355 |
The |
| 1356 |
.Cm Version |
| 1357 |
keyword matches against the version string of |
| 1358 |
.Xr sshd 8 , |
| 1359 |
for example |
| 1360 |
.Dq OpenSSH_10.0 . |
| 1361 |
.Pp |
| 1362 |
Only a subset of keywords may be used on the lines following a |
| 1363 |
.Cm Match |
| 1364 |
keyword. |
| 1365 |
Available keywords are |
| 1366 |
.Cm AcceptEnv , |
| 1367 |
.Cm AllowAgentForwarding , |
| 1368 |
.Cm AllowGroups , |
| 1369 |
.Cm AllowStreamLocalForwarding , |
| 1370 |
.Cm AllowTcpForwarding , |
| 1371 |
.Cm AllowUsers , |
| 1372 |
.Cm AuthenticationMethods , |
| 1373 |
.Cm AuthorizedKeysCommand , |
| 1374 |
.Cm AuthorizedKeysCommandUser , |
| 1375 |
.Cm AuthorizedKeysFile , |
| 1376 |
.Cm AuthorizedPrincipalsCommand , |
| 1377 |
.Cm AuthorizedPrincipalsCommandUser , |
| 1378 |
.Cm AuthorizedPrincipalsFile , |
| 1379 |
.Cm Banner , |
| 1380 |
.Cm CASignatureAlgorithms , |
| 1381 |
.Cm ChannelTimeout , |
| 1382 |
.Cm ChrootDirectory , |
| 1383 |
.Cm ClientAliveCountMax , |
| 1384 |
.Cm ClientAliveInterval , |
| 1385 |
.Cm DenyGroups , |
| 1386 |
.Cm DenyUsers , |
| 1387 |
.Cm DisableForwarding , |
| 1388 |
.Cm ExposeAuthInfo , |
| 1389 |
.Cm ForceCommand , |
| 1390 |
.Cm GatewayPorts , |
| 1391 |
.Cm GSSAPIAuthentication , |
| 1392 |
.Cm HostbasedAcceptedAlgorithms , |
| 1393 |
.Cm HostbasedAuthentication , |
| 1394 |
.Cm HostbasedUsesNameFromPacketOnly , |
| 1395 |
.Cm IgnoreRhosts , |
| 1396 |
.Cm Include , |
| 1397 |
.Cm IPQoS , |
| 1398 |
.Cm KbdInteractiveAuthentication , |
| 1399 |
.Cm KerberosAuthentication , |
| 1400 |
.Cm LogLevel , |
| 1401 |
.Cm MaxAuthTries , |
| 1402 |
.Cm MaxSessions , |
| 1403 |
.Cm PAMServiceName , |
| 1404 |
.Cm PasswordAuthentication , |
| 1405 |
.Cm PermitEmptyPasswords , |
| 1406 |
.Cm PermitListen , |
| 1407 |
.Cm PermitOpen , |
| 1408 |
.Cm PermitRootLogin , |
| 1409 |
.Cm PermitTTY , |
| 1410 |
.Cm PermitTunnel , |
| 1411 |
.Cm PermitUserRC , |
| 1412 |
.Cm PubkeyAcceptedAlgorithms , |
| 1413 |
.Cm PubkeyAuthentication , |
| 1414 |
.Cm PubkeyAuthOptions , |
| 1415 |
.Cm RefuseConnection , |
| 1416 |
.Cm RekeyLimit , |
| 1417 |
.Cm RevokedKeys , |
| 1418 |
.Cm SetEnv , |
| 1419 |
.Cm StreamLocalBindMask , |
| 1420 |
.Cm StreamLocalBindUnlink , |
| 1421 |
.Cm TrustedUserCAKeys , |
| 1422 |
.Cm UnusedConnectionTimeout , |
| 1423 |
.Cm X11DisplayOffset , |
| 1424 |
.Cm X11Forwarding |
| 1425 |
and |
| 1426 |
.Cm X11UseLocalhost . |
| 1427 |
.It Cm MaxAuthTries |
| 1428 |
Specifies the maximum number of authentication attempts permitted per |
| 1429 |
connection. |
| 1430 |
Once the number of failures reaches half this value, |
| 1431 |
additional failures are logged. |
| 1432 |
The default is 6. |
| 1433 |
.It Cm MaxSessions |
| 1434 |
Specifies the maximum number of open shell, login or subsystem (e.g. sftp) |
| 1435 |
sessions permitted per network connection. |
| 1436 |
Multiple sessions may be established by clients that support connection |
| 1437 |
multiplexing. |
| 1438 |
Setting |
| 1439 |
.Cm MaxSessions |
| 1440 |
to 1 will effectively disable session multiplexing, whereas setting it to 0 |
| 1441 |
will prevent all shell, login and subsystem sessions while still permitting |
| 1442 |
forwarding. |
| 1443 |
The default is 10. |
| 1444 |
.It Cm MaxStartups |
| 1445 |
Specifies the maximum number of concurrent unauthenticated connections to the |
| 1446 |
SSH daemon. |
| 1447 |
Additional connections will be dropped until authentication succeeds or the |
| 1448 |
.Cm LoginGraceTime |
| 1449 |
expires for a connection. |
| 1450 |
.Pp |
| 1451 |
Alternatively, random early drop can be enabled by specifying |
| 1452 |
the three colon separated values |
| 1453 |
start:rate:full (e.g. "10:30:60"). |
| 1454 |
The default is 10:30:100. |
| 1455 |
.Xr sshd 8 |
| 1456 |
will refuse connection attempts with a probability of rate/100 (30%) |
| 1457 |
if there are currently start (10) unauthenticated connections. |
| 1458 |
The probability increases linearly and all connection attempts |
| 1459 |
are refused if the number of unauthenticated connections reaches full (60). |
| 1460 |
.It Cm ModuliFile |
| 1461 |
Specifies the |
| 1462 |
.Xr moduli 5 |
| 1463 |
file that contains the Diffie-Hellman groups used for the |
| 1464 |
.Dq diffie-hellman-group-exchange-sha1 |
| 1465 |
and |
| 1466 |
.Dq diffie-hellman-group-exchange-sha256 |
| 1467 |
key exchange methods. |
| 1468 |
The default is |
| 1469 |
.Pa /etc/ssh/moduli . |
| 1470 |
.It Cm PAMServiceName |
| 1471 |
Specifies the service name used for Pluggable Authentication Modules (PAM) |
| 1472 |
authentication, authorisation and session controls when |
| 1473 |
.Cm UsePAM |
| 1474 |
is enabled. |
| 1475 |
The default is |
| 1476 |
.Cm sshd . |
| 1477 |
.It Cm PasswordAuthentication |
| 1478 |
Specifies whether password authentication is allowed. |
| 1479 |
The default is |
| 1480 |
.Cm yes . |
| 1481 |
.It Cm PermitEmptyPasswords |
| 1482 |
When password authentication is allowed, it specifies whether the |
| 1483 |
server allows login to accounts with empty password strings. |
| 1484 |
The default is |
| 1485 |
.Cm no . |
| 1486 |
.It Cm PermitListen |
| 1487 |
Specifies the addresses/ports on which a remote TCP port forwarding may listen. |
| 1488 |
The listen specification must be one of the following forms: |
| 1489 |
.Pp |
| 1490 |
.Bl -item -offset indent -compact |
| 1491 |
.It |
| 1492 |
.Cm PermitListen |
| 1493 |
.Sm off |
| 1494 |
.Ar port |
| 1495 |
.Sm on |
| 1496 |
.It |
| 1497 |
.Cm PermitListen |
| 1498 |
.Sm off |
| 1499 |
.Ar host : port |
| 1500 |
.Sm on |
| 1501 |
.El |
| 1502 |
.Pp |
| 1503 |
Multiple permissions may be specified by separating them with whitespace. |
| 1504 |
An argument of |
| 1505 |
.Cm any |
| 1506 |
can be used to remove all restrictions and permit any listen requests. |
| 1507 |
An argument of |
| 1508 |
.Cm none |
| 1509 |
can be used to prohibit all listen requests. |
| 1510 |
The host name may contain wildcards as described in the PATTERNS section in |
| 1511 |
.Xr ssh_config 5 . |
| 1512 |
The wildcard |
| 1513 |
.Sq * |
| 1514 |
can also be used in place of a port number to allow all ports. |
| 1515 |
By default all port forwarding listen requests are permitted. |
| 1516 |
Note that the |
| 1517 |
.Cm GatewayPorts |
| 1518 |
option may further restrict which addresses may be listened on. |
| 1519 |
Note also that |
| 1520 |
.Xr ssh 1 |
| 1521 |
will request a listen host of |
| 1522 |
.Dq localhost |
| 1523 |
if no listen host was specifically requested, and this name is |
| 1524 |
treated differently to explicit localhost addresses of |
| 1525 |
.Dq 127.0.0.1 |
| 1526 |
and |
| 1527 |
.Dq ::1 . |
| 1528 |
.It Cm PermitOpen |
| 1529 |
Specifies the destinations to which TCP port forwarding is permitted. |
| 1530 |
The forwarding specification must be one of the following forms: |
| 1531 |
.Pp |
| 1532 |
.Bl -item -offset indent -compact |
| 1533 |
.It |
| 1534 |
.Cm PermitOpen |
| 1535 |
.Sm off |
| 1536 |
.Ar host : port |
| 1537 |
.Sm on |
| 1538 |
.It |
| 1539 |
.Cm PermitOpen |
| 1540 |
.Sm off |
| 1541 |
.Ar IPv4_addr : port |
| 1542 |
.Sm on |
| 1543 |
.It |
| 1544 |
.Cm PermitOpen |
| 1545 |
.Sm off |
| 1546 |
.Ar \&[ IPv6_addr \&] : port |
| 1547 |
.Sm on |
| 1548 |
.El |
| 1549 |
.Pp |
| 1550 |
Multiple forwards may be specified by separating them with whitespace. |
| 1551 |
An argument of |
| 1552 |
.Cm any |
| 1553 |
can be used to remove all restrictions and permit any forwarding requests. |
| 1554 |
An argument of |
| 1555 |
.Cm none |
| 1556 |
can be used to prohibit all forwarding requests. |
| 1557 |
The wildcard |
| 1558 |
.Sq * |
| 1559 |
can be used for host or port to allow all hosts or ports respectively. |
| 1560 |
Otherwise, no pattern matching or address lookups are performed on supplied |
| 1561 |
names. |
| 1562 |
By default all port forwarding requests are permitted. |
| 1563 |
.It Cm PermitRootLogin |
| 1564 |
Specifies whether root can log in using |
| 1565 |
.Xr ssh 1 . |
| 1566 |
The argument must be |
| 1567 |
.Cm yes , |
| 1568 |
.Cm prohibit-password , |
| 1569 |
.Cm forced-commands-only , |
| 1570 |
or |
| 1571 |
.Cm no . |
| 1572 |
The default is |
| 1573 |
.Cm prohibit-password . |
| 1574 |
.Pp |
| 1575 |
If this option is set to |
| 1576 |
.Cm prohibit-password |
| 1577 |
(or its deprecated alias, |
| 1578 |
.Cm without-password ) , |
| 1579 |
password and keyboard-interactive authentication are disabled for root. |
| 1580 |
.Pp |
| 1581 |
If this option is set to |
| 1582 |
.Cm forced-commands-only , |
| 1583 |
root login with public key authentication will be allowed, |
| 1584 |
but only if the |
| 1585 |
.Ar command |
| 1586 |
option has been specified |
| 1587 |
(which may be useful for taking remote backups even if root login is |
| 1588 |
normally not allowed). |
| 1589 |
All other authentication methods are disabled for root. |
| 1590 |
.Pp |
| 1591 |
If this option is set to |
| 1592 |
.Cm no , |
| 1593 |
root is not allowed to log in. |
| 1594 |
.It Cm PermitTTY |
| 1595 |
Specifies whether |
| 1596 |
.Xr pty 4 |
| 1597 |
allocation is permitted. |
| 1598 |
The default is |
| 1599 |
.Cm yes . |
| 1600 |
.It Cm PermitTunnel |
| 1601 |
Specifies whether |
| 1602 |
.Xr tun 4 |
| 1603 |
device forwarding is allowed. |
| 1604 |
The argument must be |
| 1605 |
.Cm yes , |
| 1606 |
.Cm point-to-point |
| 1607 |
(layer 3), |
| 1608 |
.Cm ethernet |
| 1609 |
(layer 2), or |
| 1610 |
.Cm no . |
| 1611 |
Specifying |
| 1612 |
.Cm yes |
| 1613 |
permits both |
| 1614 |
.Cm point-to-point |
| 1615 |
and |
| 1616 |
.Cm ethernet . |
| 1617 |
The default is |
| 1618 |
.Cm no . |
| 1619 |
.Pp |
| 1620 |
Independent of this setting, the permissions of the selected |
| 1621 |
.Xr tun 4 |
| 1622 |
device must allow access to the user. |
| 1623 |
.It Cm PermitUserEnvironment |
| 1624 |
Specifies whether |
| 1625 |
.Pa ~/.ssh/environment |
| 1626 |
and |
| 1627 |
.Cm environment= |
| 1628 |
options in |
| 1629 |
.Pa ~/.ssh/authorized_keys |
| 1630 |
are processed by |
| 1631 |
.Xr sshd 8 . |
| 1632 |
Valid options are |
| 1633 |
.Cm yes , |
| 1634 |
.Cm no |
| 1635 |
or a pattern-list specifying which environment variable names to accept |
| 1636 |
(for example |
| 1637 |
.Qq LANG,LC_* ) . |
| 1638 |
The default is |
| 1639 |
.Cm no . |
| 1640 |
Enabling environment processing may enable users to bypass access |
| 1641 |
restrictions in some configurations using mechanisms such as |
| 1642 |
.Ev LD_PRELOAD . |
| 1643 |
.It Cm PermitUserRC |
| 1644 |
Specifies whether any |
| 1645 |
.Pa ~/.ssh/rc |
| 1646 |
file is executed. |
| 1647 |
The default is |
| 1648 |
.Cm yes . |
| 1649 |
.It Cm PerSourceMaxStartups |
| 1650 |
Specifies the number of unauthenticated connections allowed from a |
| 1651 |
given source address, or |
| 1652 |
.Dq none |
| 1653 |
if there is no limit. |
| 1654 |
This limit is applied in addition to |
| 1655 |
.Cm MaxStartups , |
| 1656 |
whichever is lower. |
| 1657 |
The default is |
| 1658 |
.Cm none . |
| 1659 |
.It Cm PerSourceNetBlockSize |
| 1660 |
Specifies the number of bits of source address that are grouped together |
| 1661 |
for the purposes of applying PerSourceMaxStartups limits. |
| 1662 |
Values for IPv4 and optionally IPv6 may be specified, separated by a colon. |
| 1663 |
The default is |
| 1664 |
.Cm 32:128 , |
| 1665 |
which means each address is considered individually. |
| 1666 |
.It Cm PerSourcePenalties |
| 1667 |
Controls penalties for various conditions that may represent attacks on |
| 1668 |
.Xr sshd 8 . |
| 1669 |
If a penalty is enforced against a client then its source address and any |
| 1670 |
others in the same network, as defined by |
| 1671 |
.Cm PerSourceNetBlockSize , |
| 1672 |
will be refused connection for a period. |
| 1673 |
.Pp |
| 1674 |
A penalty doesn't affect concurrent connections in progress, but multiple |
| 1675 |
penalties from the same source from concurrent connections will accumulate |
| 1676 |
up to a maximum. |
| 1677 |
Conversely, penalties are not applied until a minimum threshold time has been |
| 1678 |
accumulated. |
| 1679 |
.Pp |
| 1680 |
Penalties are enabled by default with the default settings listed below |
| 1681 |
but may disabled using the |
| 1682 |
.Cm no |
| 1683 |
keyword. |
| 1684 |
The defaults may be overridden by specifying one or more of the keywords below, |
| 1685 |
separated by whitespace. |
| 1686 |
All keywords accept arguments, e.g.\& |
| 1687 |
.Qq crash:2m . |
| 1688 |
.Bl -tag -width Ds |
| 1689 |
.It Cm crash:duration |
| 1690 |
Specifies how long to refuse clients that cause a crash of |
| 1691 |
.Xr sshd 8 (default: 90s). |
| 1692 |
.It Cm authfail:duration |
| 1693 |
Specifies how long to refuse clients that disconnect after making one or more |
| 1694 |
unsuccessful authentication attempts (default: 5s). |
| 1695 |
.It Cm invaliduser:duration |
| 1696 |
Specifies how long to refuse clients that attempt to log in with an invalid |
| 1697 |
user (default: 5s). |
| 1698 |
.It Cm refuseconnection:duration |
| 1699 |
Specifies how long to refuse clients that were administratively prohibited |
| 1700 |
connection via the |
| 1701 |
.Cm RefuseConnection |
| 1702 |
option (default: 10s). |
| 1703 |
.It Cm noauth:duration |
| 1704 |
Specifies how long to refuse clients that disconnect without attempting |
| 1705 |
authentication (default: 1s). |
| 1706 |
This timeout should be used cautiously otherwise it may penalise legitimate |
| 1707 |
scanning tools such as |
| 1708 |
.Xr ssh-keyscan 1 . |
| 1709 |
.It Cm grace-exceeded:duration |
| 1710 |
Specifies how long to refuse clients that fail to authenticate after |
| 1711 |
.Cm LoginGraceTime |
| 1712 |
(default: 10s). |
| 1713 |
.It Cm max:duration |
| 1714 |
Specifies the maximum time a particular source address range will be refused |
| 1715 |
access for (default: 10m). |
| 1716 |
Repeated penalties will accumulate up to this maximum. |
| 1717 |
.It Cm min:duration |
| 1718 |
Specifies the minimum penalty that must accrue before enforcement begins |
| 1719 |
(default: 15s). |
| 1720 |
.It Cm max-sources4:number , max-sources6:number |
| 1721 |
Specifies the maximum number of client IPv4 and IPv6 address ranges to |
| 1722 |
track for penalties (default: 65536 for both). |
| 1723 |
.It Cm overflow:mode |
| 1724 |
Controls how the server behaves when |
| 1725 |
.Cm max-sources4 |
| 1726 |
or |
| 1727 |
.Cm max-sources6 |
| 1728 |
is exceeded. |
| 1729 |
There are two operating modes: |
| 1730 |
.Cm deny-all , |
| 1731 |
which denies all incoming connections other than those exempted via |
| 1732 |
.Cm PerSourcePenaltyExemptList |
| 1733 |
until a penalty expires, and |
| 1734 |
.Cm permissive , |
| 1735 |
which allows new connections by removing existing penalties early |
| 1736 |
(default: permissive). |
| 1737 |
Note that client penalties below the |
| 1738 |
.Cm min |
| 1739 |
threshold count against the total number of tracked penalties. |
| 1740 |
IPv4 and IPv6 addresses are tracked separately, so an overflow in one will |
| 1741 |
not affect the other. |
| 1742 |
.It Cm overflow6:mode |
| 1743 |
Allows specifying a different overflow mode for IPv6 addresses. |
| 1744 |
The default it to use the same overflow mode as was specified for IPv4. |
| 1745 |
.El |
| 1746 |
.It Cm PerSourcePenaltyExemptList |
| 1747 |
Specifies a comma-separated list of addresses to exempt from penalties. |
| 1748 |
This list may contain wildcards and CIDR address/masklen ranges. |
| 1749 |
Note that the mask length provided must be consistent with the address - |
| 1750 |
it is an error to specify a mask length that is too long for the address |
| 1751 |
or one with bits set in this host portion of the address. |
| 1752 |
For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. |
| 1753 |
The default is not to exempt any addresses. |
| 1754 |
.It Cm PidFile |
| 1755 |
Specifies the file that contains the process ID of the |
| 1756 |
SSH daemon, or |
| 1757 |
.Cm none |
| 1758 |
to not write one. |
| 1759 |
The default is |
| 1760 |
.Pa /run/sshd.pid . |
| 1761 |
.It Cm Port |
| 1762 |
Specifies the port number that |
| 1763 |
.Xr sshd 8 |
| 1764 |
listens on. |
| 1765 |
The default is 22. |
| 1766 |
Multiple options of this type are permitted. |
| 1767 |
See also |
| 1768 |
.Cm ListenAddress . |
| 1769 |
.It Cm PrintLastLog |
| 1770 |
Specifies whether |
| 1771 |
.Xr sshd 8 |
| 1772 |
should print the date and time of the last user login when a user logs |
| 1773 |
in interactively. |
| 1774 |
The default is |
| 1775 |
.Cm yes . |
| 1776 |
.It Cm PrintMotd |
| 1777 |
Specifies whether |
| 1778 |
.Xr sshd 8 |
| 1779 |
should print |
| 1780 |
.Pa /etc/motd |
| 1781 |
when a user logs in interactively. |
| 1782 |
(On some systems it is also printed by the shell, |
| 1783 |
.Pa /etc/profile , |
| 1784 |
or equivalent.) |
| 1785 |
The default is |
| 1786 |
.Cm yes . |
| 1787 |
.It Cm PubkeyAcceptedAlgorithms |
| 1788 |
Specifies the signature algorithms that will be accepted for public key |
| 1789 |
authentication as a list of comma-separated patterns. |
| 1790 |
Alternately if the specified list begins with a |
| 1791 |
.Sq + |
| 1792 |
character, then the specified algorithms will be appended to the default set |
| 1793 |
instead of replacing them. |
| 1794 |
If the specified list begins with a |
| 1795 |
.Sq - |
| 1796 |
character, then the specified algorithms (including wildcards) will be removed |
| 1797 |
from the default set instead of replacing them. |
| 1798 |
If the specified list begins with a |
| 1799 |
.Sq ^ |
| 1800 |
character, then the specified algorithms will be placed at the head of the |
| 1801 |
default set. |
| 1802 |
The default for this option is: |
| 1803 |
.Bd -literal -offset 3n |
| 1804 |
[email protected], |
| 1805 |
[email protected], |
| 1806 |
[email protected], |
| 1807 |
[email protected], |
| 1808 |
[email protected], |
| 1809 |
[email protected], |
| 1810 |
[email protected], |
| 1811 |
[email protected], |
| 1812 |
[email protected], |
| 1813 |
ssh-ed25519, |
| 1814 |
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
| 1815 |
[email protected], |
| 1816 |
[email protected], |
| 1817 |
[email protected], |
| 1818 |
rsa-sha2-512,rsa-sha2-256 |
| 1819 |
.Ed |
| 1820 |
.Pp |
| 1821 |
The list of available signature algorithms may also be obtained using |
| 1822 |
.Qq ssh -Q PubkeyAcceptedAlgorithms . |
| 1823 |
.It Cm PubkeyAuthOptions |
| 1824 |
Sets one or more public key authentication options. |
| 1825 |
The supported keywords are: |
| 1826 |
.Cm none |
| 1827 |
(the default; indicating no additional options are enabled), |
| 1828 |
.Cm touch-required |
| 1829 |
and |
| 1830 |
.Cm verify-required . |
| 1831 |
.Pp |
| 1832 |
The |
| 1833 |
.Cm touch-required |
| 1834 |
option causes public key authentication using a FIDO authenticator algorithm |
| 1835 |
(i.e.\& |
| 1836 |
.Cm ecdsa-sk |
| 1837 |
or |
| 1838 |
.Cm ed25519-sk ) |
| 1839 |
to always require the signature to attest that a physically present user |
| 1840 |
explicitly confirmed the authentication (usually by touching the authenticator). |
| 1841 |
By default, |
| 1842 |
.Xr sshd 8 |
| 1843 |
requires user presence unless overridden with an authorized_keys option. |
| 1844 |
The |
| 1845 |
.Cm touch-required |
| 1846 |
flag disables this override. |
| 1847 |
.Pp |
| 1848 |
The |
| 1849 |
.Cm verify-required |
| 1850 |
option requires a FIDO key signature attest that the user was verified, |
| 1851 |
e.g. via a PIN. |
| 1852 |
.Pp |
| 1853 |
Neither the |
| 1854 |
.Cm touch-required |
| 1855 |
or |
| 1856 |
.Cm verify-required |
| 1857 |
options have any effect for other, non-FIDO, public key types. |
| 1858 |
.It Cm PubkeyAuthentication |
| 1859 |
Specifies whether public key authentication is allowed. |
| 1860 |
The default is |
| 1861 |
.Cm yes . |
| 1862 |
.It Cm RefuseConnection |
| 1863 |
Indicates that |
| 1864 |
.Xr sshd 8 |
| 1865 |
should unconditionally terminate the connection. |
| 1866 |
Additionally, a |
| 1867 |
.Cm refuseconnection |
| 1868 |
penalty may be recorded against the source of the connection if |
| 1869 |
.Cm PerSourcePenalties |
| 1870 |
are enabled. |
| 1871 |
This option is only really useful in a |
| 1872 |
.Cm Match |
| 1873 |
block. |
| 1874 |
.It Cm RekeyLimit |
| 1875 |
Specifies the maximum amount of data that may be transmitted or received |
| 1876 |
before the session key is renegotiated, optionally followed by a maximum |
| 1877 |
amount of time that may pass before the session key is renegotiated. |
| 1878 |
The first argument is specified in bytes and may have a suffix of |
| 1879 |
.Sq K , |
| 1880 |
.Sq M , |
| 1881 |
or |
| 1882 |
.Sq G |
| 1883 |
to indicate Kilobytes, Megabytes, or Gigabytes, respectively. |
| 1884 |
The default is between |
| 1885 |
.Sq 1G |
| 1886 |
and |
| 1887 |
.Sq 4G , |
| 1888 |
depending on the cipher. |
| 1889 |
The optional second value is specified in seconds and may use any of the |
| 1890 |
units documented in the |
| 1891 |
.Sx TIME FORMATS |
| 1892 |
section. |
| 1893 |
The default value for |
| 1894 |
.Cm RekeyLimit |
| 1895 |
is |
| 1896 |
.Cm default none , |
| 1897 |
which means that rekeying is performed after the cipher's default amount |
| 1898 |
of data has been sent or received and no time based rekeying is done. |
| 1899 |
.It Cm RequiredRSASize |
| 1900 |
Specifies the minimum RSA key size (in bits) that |
| 1901 |
.Xr sshd 8 |
| 1902 |
will accept. |
| 1903 |
User and host-based authentication keys smaller than this limit will be |
| 1904 |
refused. |
| 1905 |
The default is |
| 1906 |
.Cm 1024 |
| 1907 |
bits. |
| 1908 |
Note that this limit may only be raised from the default. |
| 1909 |
.It Cm RevokedKeys |
| 1910 |
Specifies revoked public keys file, or |
| 1911 |
.Cm none |
| 1912 |
to not use one. |
| 1913 |
Keys listed in this file will be refused for public key authentication. |
| 1914 |
Note that if this file is not readable, then public key authentication will |
| 1915 |
be refused for all users. |
| 1916 |
Keys may be specified as a text file, listing one public key per line, or as |
| 1917 |
an OpenSSH Key Revocation List (KRL) as generated by |
| 1918 |
.Xr ssh-keygen 1 . |
| 1919 |
This file may be consulted for each public key authentication attempt |
| 1920 |
received by |
| 1921 |
.Xr sshd 8 |
| 1922 |
and its contents must be consistent at all times, therefore it should only |
| 1923 |
be atomically replaced and never modified in place while the server is running. |
| 1924 |
For more information on KRLs, see the KEY REVOCATION LISTS section in |
| 1925 |
.Xr ssh-keygen 1 . |
| 1926 |
.It Cm SecurityKeyProvider |
| 1927 |
Specifies a path to a library that will be used when loading |
| 1928 |
FIDO authenticator-hosted keys, overriding the default of using |
| 1929 |
the built-in USB HID support. |
| 1930 |
.It Cm SetEnv |
| 1931 |
Specifies one or more environment variables to set in child sessions started |
| 1932 |
by |
| 1933 |
.Xr sshd 8 |
| 1934 |
as |
| 1935 |
.Dq NAME=VALUE . |
| 1936 |
The environment value may be quoted (e.g. if it contains whitespace |
| 1937 |
characters). |
| 1938 |
Environment variables set by |
| 1939 |
.Cm SetEnv |
| 1940 |
override the default environment and any variables specified by the user |
| 1941 |
via |
| 1942 |
.Cm AcceptEnv |
| 1943 |
or |
| 1944 |
.Cm PermitUserEnvironment . |
| 1945 |
.It Cm SshdAuthPath |
| 1946 |
Overrides the default path to the |
| 1947 |
.Cm sshd-auth |
| 1948 |
binary that is invoked to complete user authentication. |
| 1949 |
The default is |
| 1950 |
.Pa /usr/lib/openssh/sshd-auth . |
| 1951 |
This option is intended for use by tests. |
| 1952 |
.It Cm SshdSessionPath |
| 1953 |
Overrides the default path to the |
| 1954 |
.Cm sshd-session |
| 1955 |
binary that is invoked to handle each connection. |
| 1956 |
The default is |
| 1957 |
.Pa /usr/lib/openssh/sshd-session . |
| 1958 |
This option is intended for use by tests. |
| 1959 |
.It Cm StreamLocalBindMask |
| 1960 |
Sets the octal file creation mode mask |
| 1961 |
.Pq umask |
| 1962 |
used when creating a Unix-domain socket file for local or remote |
| 1963 |
port forwarding. |
| 1964 |
This option is only used for port forwarding to a Unix-domain socket file. |
| 1965 |
.Pp |
| 1966 |
The default value is 0177, which creates a Unix-domain socket file that is |
| 1967 |
readable and writable only by the owner. |
| 1968 |
Note that not all operating systems honor the file mode on Unix-domain |
| 1969 |
socket files. |
| 1970 |
.It Cm StreamLocalBindUnlink |
| 1971 |
Specifies whether to remove an existing Unix-domain socket file for local |
| 1972 |
or remote port forwarding before creating a new one. |
| 1973 |
If the socket file already exists and |
| 1974 |
.Cm StreamLocalBindUnlink |
| 1975 |
is not enabled, |
| 1976 |
.Nm sshd |
| 1977 |
will be unable to forward the port to the Unix-domain socket file. |
| 1978 |
This option is only used for port forwarding to a Unix-domain socket file. |
| 1979 |
.Pp |
| 1980 |
The argument must be |
| 1981 |
.Cm yes |
| 1982 |
or |
| 1983 |
.Cm no . |
| 1984 |
The default is |
| 1985 |
.Cm no . |
| 1986 |
.It Cm StrictModes |
| 1987 |
Specifies whether |
| 1988 |
.Xr sshd 8 |
| 1989 |
should check file modes and ownership of the |
| 1990 |
user's files and home directory before accepting login. |
| 1991 |
This is normally desirable because novices sometimes accidentally leave their |
| 1992 |
directory or files world-writable. |
| 1993 |
The default is |
| 1994 |
.Cm yes . |
| 1995 |
Note that this does not apply to |
| 1996 |
.Cm ChrootDirectory , |
| 1997 |
whose permissions and ownership are checked unconditionally. |
| 1998 |
.It Cm Subsystem |
| 1999 |
Configures an external subsystem (e.g. file transfer daemon). |
| 2000 |
Arguments should be a subsystem name and a command (with optional arguments) |
| 2001 |
to execute upon subsystem request. |
| 2002 |
.Pp |
| 2003 |
The command |
| 2004 |
.Cm sftp-server |
| 2005 |
implements the SFTP file transfer subsystem. |
| 2006 |
.Pp |
| 2007 |
Alternately the name |
| 2008 |
.Cm internal-sftp |
| 2009 |
implements an in-process SFTP server. |
| 2010 |
This may simplify configurations using |
| 2011 |
.Cm ChrootDirectory |
| 2012 |
to force a different filesystem root on clients. |
| 2013 |
It accepts the same command line arguments as |
| 2014 |
.Cm sftp-server |
| 2015 |
and even though it is in-process, settings such as |
| 2016 |
.Cm LogLevel |
| 2017 |
or |
| 2018 |
.Cm SyslogFacility |
| 2019 |
do not apply to it and must be set explicitly via |
| 2020 |
command line arguments. |
| 2021 |
.Pp |
| 2022 |
By default no subsystems are defined. |
| 2023 |
.It Cm SyslogFacility |
| 2024 |
Gives the facility code that is used when logging messages from |
| 2025 |
.Xr sshd 8 . |
| 2026 |
The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
| 2027 |
LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. |
| 2028 |
The default is AUTH. |
| 2029 |
.It Cm TCPKeepAlive |
| 2030 |
Specifies whether the system should send TCP keepalive messages to the |
| 2031 |
other side. |
| 2032 |
If they are sent, death of the connection or crash of one |
| 2033 |
of the machines will be properly noticed. |
| 2034 |
However, this means that |
| 2035 |
connections will die if the route is down temporarily, and some people |
| 2036 |
find it annoying. |
| 2037 |
On the other hand, if TCP keepalives are not sent, |
| 2038 |
sessions may hang indefinitely on the server, leaving |
| 2039 |
.Qq ghost |
| 2040 |
users and consuming server resources. |
| 2041 |
.Pp |
| 2042 |
The default is |
| 2043 |
.Cm yes |
| 2044 |
(to send TCP keepalive messages), and the server will notice |
| 2045 |
if the network goes down or the client host crashes. |
| 2046 |
This avoids infinitely hanging sessions. |
| 2047 |
.Pp |
| 2048 |
To disable TCP keepalive messages, the value should be set to |
| 2049 |
.Cm no . |
| 2050 |
.Pp |
| 2051 |
This option was formerly called |
| 2052 |
.Cm KeepAlive . |
| 2053 |
.It Cm TrustedUserCAKeys |
| 2054 |
Specifies a file containing public keys of certificate authorities that are |
| 2055 |
trusted to sign user certificates for authentication, or |
| 2056 |
.Cm none |
| 2057 |
to not use one. |
| 2058 |
Keys are listed one per line; empty lines and comments starting with |
| 2059 |
.Ql # |
| 2060 |
are allowed. |
| 2061 |
If a certificate is presented for authentication and has its signing CA key |
| 2062 |
listed in this file, then it may be used for authentication for any user |
| 2063 |
listed in the certificate's principals list. |
| 2064 |
Note that certificates that lack a list of principals will not be permitted |
| 2065 |
for authentication using |
| 2066 |
.Cm TrustedUserCAKeys . |
| 2067 |
For more details on certificates, see the CERTIFICATES section in |
| 2068 |
.Xr ssh-keygen 1 . |
| 2069 |
.It Cm UnusedConnectionTimeout |
| 2070 |
Specifies whether and how quickly |
| 2071 |
.Xr sshd 8 |
| 2072 |
should close client connections with no open channels. |
| 2073 |
Open channels include active shell, command execution or subsystem |
| 2074 |
sessions, connected network, socket, agent or X11 forwardings. |
| 2075 |
Forwarding listeners, such as those from the |
| 2076 |
.Xr ssh 1 |
| 2077 |
.Fl R |
| 2078 |
flag, are not considered as open channels and do not prevent the timeout. |
| 2079 |
The timeout value |
| 2080 |
is specified in seconds or may use any of the units documented in the |
| 2081 |
.Sx TIME FORMATS |
| 2082 |
section. |
| 2083 |
.Pp |
| 2084 |
Note that this timeout starts when the client connection completes |
| 2085 |
user authentication but before the client has an opportunity to open any |
| 2086 |
channels. |
| 2087 |
Caution should be used when using short timeout values, as they may not |
| 2088 |
provide sufficient time for the client to request and open its channels |
| 2089 |
before terminating the connection. |
| 2090 |
.Pp |
| 2091 |
The default |
| 2092 |
.Cm none |
| 2093 |
is to never expire connections for having no open channels. |
| 2094 |
This option may be useful in conjunction with |
| 2095 |
.Cm ChannelTimeout . |
| 2096 |
.It Cm UseDNS |
| 2097 |
Specifies whether |
| 2098 |
.Xr sshd 8 |
| 2099 |
should look up the remote host name, and to check that |
| 2100 |
the resolved host name for the remote IP address maps back to the |
| 2101 |
very same IP address. |
| 2102 |
.Pp |
| 2103 |
If this option is set to |
| 2104 |
.Cm no |
| 2105 |
(the default) then only addresses and not host names may be used in |
| 2106 |
.Pa ~/.ssh/authorized_keys |
| 2107 |
.Cm from |
| 2108 |
and |
| 2109 |
.Nm |
| 2110 |
.Cm Match |
| 2111 |
.Cm Host |
| 2112 |
directives. |
| 2113 |
.It Cm UsePAM |
| 2114 |
Enables the Pluggable Authentication Module interface. |
| 2115 |
If set to |
| 2116 |
.Cm yes |
| 2117 |
this will enable PAM authentication using |
| 2118 |
.Cm KbdInteractiveAuthentication |
| 2119 |
and |
| 2120 |
.Cm PasswordAuthentication |
| 2121 |
in addition to PAM account and session module processing for all |
| 2122 |
authentication types. |
| 2123 |
.Pp |
| 2124 |
Because PAM keyboard-interactive authentication usually serves an equivalent |
| 2125 |
role to password authentication, you should disable either |
| 2126 |
.Cm PasswordAuthentication |
| 2127 |
or |
| 2128 |
.Cm KbdInteractiveAuthentication . |
| 2129 |
.Pp |
| 2130 |
If |
| 2131 |
.Cm UsePAM |
| 2132 |
is enabled, you will not be able to run |
| 2133 |
.Xr sshd 8 |
| 2134 |
as a non-root user. |
| 2135 |
The default is |
| 2136 |
.Cm no . |
| 2137 |
.It Cm VersionAddendum |
| 2138 |
Optionally specifies additional text to append to the SSH protocol banner |
| 2139 |
sent by the server upon connection. |
| 2140 |
The default is |
| 2141 |
.Cm none . |
| 2142 |
.It Cm X11DisplayOffset |
| 2143 |
Specifies the first display number available for |
| 2144 |
.Xr sshd 8 Ns 's |
| 2145 |
X11 forwarding. |
| 2146 |
This prevents sshd from interfering with real X11 servers. |
| 2147 |
The default is 10. |
| 2148 |
.It Cm X11Forwarding |
| 2149 |
Specifies whether X11 forwarding is permitted. |
| 2150 |
The argument must be |
| 2151 |
.Cm yes |
| 2152 |
or |
| 2153 |
.Cm no . |
| 2154 |
The default is |
| 2155 |
.Cm no . |
| 2156 |
.Pp |
| 2157 |
When X11 forwarding is enabled, there may be additional exposure to |
| 2158 |
the server and to client displays if the |
| 2159 |
.Xr sshd 8 |
| 2160 |
proxy display is configured to listen on the wildcard address (see |
| 2161 |
.Cm X11UseLocalhost ) , |
| 2162 |
though this is not the default. |
| 2163 |
Additionally, the authentication spoofing and authentication data |
| 2164 |
verification and substitution occur on the client side. |
| 2165 |
The security risk of using X11 forwarding is that the client's X11 |
| 2166 |
display server may be exposed to attack when the SSH client requests |
| 2167 |
forwarding (see the warnings for |
| 2168 |
.Cm ForwardX11 |
| 2169 |
in |
| 2170 |
.Xr ssh_config 5 ) . |
| 2171 |
A system administrator may have a stance in which they want to |
| 2172 |
protect clients that may expose themselves to attack by unwittingly |
| 2173 |
requesting X11 forwarding, which can warrant a |
| 2174 |
.Cm no |
| 2175 |
setting. |
| 2176 |
.Pp |
| 2177 |
Note that disabling X11 forwarding does not prevent users from |
| 2178 |
forwarding X11 traffic, as users can always install their own forwarders. |
| 2179 |
.It Cm X11UseLocalhost |
| 2180 |
Specifies whether |
| 2181 |
.Xr sshd 8 |
| 2182 |
should bind the X11 forwarding server to the loopback address or to |
| 2183 |
the wildcard address. |
| 2184 |
By default, |
| 2185 |
sshd binds the forwarding server to the loopback address and sets the |
| 2186 |
hostname part of the |
| 2187 |
.Ev DISPLAY |
| 2188 |
environment variable to |
| 2189 |
.Cm localhost . |
| 2190 |
This prevents remote hosts from connecting to the proxy display. |
| 2191 |
However, some older X11 clients may not function with this |
| 2192 |
configuration. |
| 2193 |
.Cm X11UseLocalhost |
| 2194 |
may be set to |
| 2195 |
.Cm no |
| 2196 |
to specify that the forwarding server should be bound to the wildcard |
| 2197 |
address. |
| 2198 |
The argument must be |
| 2199 |
.Cm yes |
| 2200 |
or |
| 2201 |
.Cm no . |
| 2202 |
The default is |
| 2203 |
.Cm yes . |
| 2204 |
.It Cm XAuthLocation |
| 2205 |
Specifies the full pathname of the |
| 2206 |
.Xr xauth 1 |
| 2207 |
program, or |
| 2208 |
.Cm none |
| 2209 |
to not use one. |
| 2210 |
The default is |
| 2211 |
.Pa /usr/bin/xauth . |
| 2212 |
.El |
| 2213 |
.Sh TIME FORMATS |
| 2214 |
.Xr sshd 8 |
| 2215 |
command-line arguments and configuration file options that specify time |
| 2216 |
may be expressed using a sequence of the form: |
| 2217 |
.Sm off |
| 2218 |
.Ar time Op Ar qualifier , |
| 2219 |
.Sm on |
| 2220 |
where |
| 2221 |
.Ar time |
| 2222 |
is a positive integer value and |
| 2223 |
.Ar qualifier |
| 2224 |
is one of the following: |
| 2225 |
.Pp |
| 2226 |
.Bl -tag -width Ds -compact -offset indent |
| 2227 |
.It Aq Cm none |
| 2228 |
seconds |
| 2229 |
.It Cm s | Cm S |
| 2230 |
seconds |
| 2231 |
.It Cm m | Cm M |
| 2232 |
minutes |
| 2233 |
.It Cm h | Cm H |
| 2234 |
hours |
| 2235 |
.It Cm d | Cm D |
| 2236 |
days |
| 2237 |
.It Cm w | Cm W |
| 2238 |
weeks |
| 2239 |
.El |
| 2240 |
.Pp |
| 2241 |
Each member of the sequence is added together to calculate |
| 2242 |
the total time value. |
| 2243 |
.Pp |
| 2244 |
Time format examples: |
| 2245 |
.Pp |
| 2246 |
.Bl -tag -width Ds -compact -offset indent |
| 2247 |
.It 600 |
| 2248 |
600 seconds (10 minutes) |
| 2249 |
.It 10m |
| 2250 |
10 minutes |
| 2251 |
.It 1h30m |
| 2252 |
1 hour 30 minutes (90 minutes) |
| 2253 |
.El |
| 2254 |
.Sh TOKENS |
| 2255 |
Arguments to some keywords can make use of tokens, |
| 2256 |
which are expanded at runtime. |
| 2257 |
Tokens are expanded without quoting or escaping of shell characters. |
| 2258 |
It is the administrator's responsibility to ensure they are safe in the |
| 2259 |
context of their use. |
| 2260 |
.Pp |
| 2261 |
The supported tokens in |
| 2262 |
.Nm |
| 2263 |
are: |
| 2264 |
.Pp |
| 2265 |
.Bl -tag -width XXXX -offset indent -compact |
| 2266 |
.It %% |
| 2267 |
A literal |
| 2268 |
.Sq % . |
| 2269 |
.It \&%C |
| 2270 |
Identifies the connection endpoints, containing |
| 2271 |
four space-separated values: client address, client port number, |
| 2272 |
server address, and server port number. |
| 2273 |
.It \&%D |
| 2274 |
The routing domain in which the incoming connection was received. |
| 2275 |
.It %F |
| 2276 |
The fingerprint of the CA key. |
| 2277 |
.It %f |
| 2278 |
The fingerprint of the key or certificate. |
| 2279 |
.It %h |
| 2280 |
The home directory of the user. |
| 2281 |
.It %i |
| 2282 |
The key ID in the certificate. |
| 2283 |
.It %K |
| 2284 |
The base64-encoded CA key. |
| 2285 |
.It %k |
| 2286 |
The base64-encoded key or certificate for authentication. |
| 2287 |
.It %s |
| 2288 |
The serial number of the certificate. |
| 2289 |
.It \&%T |
| 2290 |
The type of the CA key. |
| 2291 |
.It %t |
| 2292 |
The key or certificate type. |
| 2293 |
.It \&%U |
| 2294 |
The numeric user ID of the target user. |
| 2295 |
.It %u |
| 2296 |
The username. |
| 2297 |
.El |
| 2298 |
.Pp |
| 2299 |
.Cm AuthorizedKeysCommand |
| 2300 |
accepts the tokens %%, %C, %D, %f, %h, %k, %t, %U, and %u. |
| 2301 |
.Pp |
| 2302 |
.Cm AuthorizedKeysFile |
| 2303 |
accepts the tokens %%, %h, %U, and %u. |
| 2304 |
.Pp |
| 2305 |
.Cm AuthorizedPrincipalsCommand |
| 2306 |
accepts the tokens %%, %C, %D, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u. |
| 2307 |
.Pp |
| 2308 |
.Cm AuthorizedPrincipalsFile |
| 2309 |
accepts the tokens %%, %h, %U, and %u. |
| 2310 |
.Pp |
| 2311 |
.Cm ChrootDirectory |
| 2312 |
accepts the tokens %%, %h, %U, and %u. |
| 2313 |
.Sh FILES |
| 2314 |
.Bl -tag -width Ds |
| 2315 |
.It Pa /etc/ssh/sshd_config |
| 2316 |
Contains configuration data for |
| 2317 |
.Xr sshd 8 . |
| 2318 |
This file should be writable by root only, but it is recommended |
| 2319 |
(though not necessary) that it be world-readable. |
| 2320 |
.El |
| 2321 |
.Sh SEE ALSO |
| 2322 |
.Xr sftp-server 8 , |
| 2323 |
.Xr sshd 8 |
| 2324 |
.Sh AUTHORS |
| 2325 |
.An -nosplit |
| 2326 |
OpenSSH is a derivative of the original and free |
| 2327 |
ssh 1.2.12 release by |
| 2328 |
.An Tatu Ylonen . |
| 2329 |
.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , |
| 2330 |
.An Theo de Raadt |
| 2331 |
and |
| 2332 |
.An Dug Song |
| 2333 |
removed many bugs, re-added newer features and |
| 2334 |
created OpenSSH. |
| 2335 |
.An Markus Friedl |
| 2336 |
contributed the support for SSH protocol versions 1.5 and 2.0. |
| 2337 |
.An Niels Provos |
| 2338 |
and |
| 2339 |
.An Markus Friedl |
| 2340 |
contributed support for privilege separation. |