118de8d7fSPeter Avalos.\" 218de8d7fSPeter Avalos.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 318de8d7fSPeter Avalos.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 418de8d7fSPeter Avalos.\" All rights reserved 518de8d7fSPeter Avalos.\" 618de8d7fSPeter Avalos.\" As far as I am concerned, the code I have written for this software 718de8d7fSPeter Avalos.\" can be used freely for any purpose. Any derived versions of this 818de8d7fSPeter Avalos.\" software must be clearly marked as such, and if the derived work is 918de8d7fSPeter Avalos.\" incompatible with the protocol description in the RFC file, it must be 1018de8d7fSPeter Avalos.\" called by a name other than "ssh" or "Secure Shell". 1118de8d7fSPeter Avalos.\" 1218de8d7fSPeter Avalos.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. 1318de8d7fSPeter Avalos.\" Copyright (c) 1999 Aaron Campbell. All rights reserved. 1418de8d7fSPeter Avalos.\" Copyright (c) 1999 Theo de Raadt. All rights reserved. 1518de8d7fSPeter Avalos.\" 1618de8d7fSPeter Avalos.\" Redistribution and use in source and binary forms, with or without 1718de8d7fSPeter Avalos.\" modification, are permitted provided that the following conditions 1818de8d7fSPeter Avalos.\" are met: 1918de8d7fSPeter Avalos.\" 1. Redistributions of source code must retain the above copyright 2018de8d7fSPeter Avalos.\" notice, this list of conditions and the following disclaimer. 2118de8d7fSPeter Avalos.\" 2. Redistributions in binary form must reproduce the above copyright 2218de8d7fSPeter Avalos.\" notice, this list of conditions and the following disclaimer in the 2318de8d7fSPeter Avalos.\" documentation and/or other materials provided with the distribution. 2418de8d7fSPeter Avalos.\" 2518de8d7fSPeter Avalos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2618de8d7fSPeter Avalos.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2718de8d7fSPeter Avalos.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2818de8d7fSPeter Avalos.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2918de8d7fSPeter Avalos.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 3018de8d7fSPeter Avalos.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3118de8d7fSPeter Avalos.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3218de8d7fSPeter Avalos.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3318de8d7fSPeter Avalos.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3418de8d7fSPeter Avalos.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3518de8d7fSPeter Avalos.\" 36*ba1276acSMatthew Dillon.\" $OpenBSD: sshd_config.5,v 1.365 2024/06/24 06:59:39 jmc Exp $ 37*ba1276acSMatthew Dillon.Dd $Mdocdate: June 24 2024 $ 3818de8d7fSPeter Avalos.Dt SSHD_CONFIG 5 3918de8d7fSPeter Avalos.Os 4018de8d7fSPeter Avalos.Sh NAME 4118de8d7fSPeter Avalos.Nm sshd_config 420cbfa66cSDaniel Fojt.Nd OpenSSH daemon configuration file 4318de8d7fSPeter Avalos.Sh DESCRIPTION 4418de8d7fSPeter Avalos.Xr sshd 8 4518de8d7fSPeter Avalosreads configuration data from 4618de8d7fSPeter Avalos.Pa /etc/ssh/sshd_config 4718de8d7fSPeter Avalos(or the file specified with 4818de8d7fSPeter Avalos.Fl f 4918de8d7fSPeter Avaloson the command line). 5018de8d7fSPeter AvalosThe file contains keyword-argument pairs, one per line. 51*ba1276acSMatthew DillonUnless noted otherwise, for each keyword, the first obtained value will be used. 5218de8d7fSPeter AvalosLines starting with 5318de8d7fSPeter Avalos.Ql # 5418de8d7fSPeter Avalosand empty lines are interpreted as comments. 5518de8d7fSPeter AvalosArguments may optionally be enclosed in double quotes 5618de8d7fSPeter Avalos.Pq \&" 5718de8d7fSPeter Avalosin order to represent arguments containing spaces. 5818de8d7fSPeter Avalos.Pp 5918de8d7fSPeter AvalosThe possible 6018de8d7fSPeter Avaloskeywords and their meanings are as follows (note that 6118de8d7fSPeter Avaloskeywords are case-insensitive and arguments are case-sensitive): 6218de8d7fSPeter Avalos.Bl -tag -width Ds 6318de8d7fSPeter Avalos.It Cm AcceptEnv 6418de8d7fSPeter AvalosSpecifies what environment variables sent by the client will be copied into 6518de8d7fSPeter Avalosthe session's 6618de8d7fSPeter Avalos.Xr environ 7 . 6718de8d7fSPeter AvalosSee 6818de8d7fSPeter Avalos.Cm SendEnv 69664f4763Szrjand 70664f4763Szrj.Cm SetEnv 7118de8d7fSPeter Avalosin 7218de8d7fSPeter Avalos.Xr ssh_config 5 7318de8d7fSPeter Avalosfor how to configure the client. 74e9778795SPeter AvalosThe 75e9778795SPeter Avalos.Ev TERM 76664f4763Szrjenvironment variable is always accepted whenever the client 77e9778795SPeter Avalosrequests a pseudo-terminal as it is required by the protocol. 7818de8d7fSPeter AvalosVariables are specified by name, which may contain the wildcard characters 7918de8d7fSPeter Avalos.Ql * 8018de8d7fSPeter Avalosand 8118de8d7fSPeter Avalos.Ql \&? . 8218de8d7fSPeter AvalosMultiple environment variables may be separated by whitespace or spread 8318de8d7fSPeter Avalosacross multiple 8418de8d7fSPeter Avalos.Cm AcceptEnv 8518de8d7fSPeter Avalosdirectives. 8618de8d7fSPeter AvalosBe warned that some environment variables could be used to bypass restricted 8718de8d7fSPeter Avalosuser environments. 8818de8d7fSPeter AvalosFor this reason, care should be taken in the use of this directive. 8918de8d7fSPeter AvalosThe default is not to accept any environment variables. 9018de8d7fSPeter Avalos.It Cm AddressFamily 9118de8d7fSPeter AvalosSpecifies which address family should be used by 9218de8d7fSPeter Avalos.Xr sshd 8 . 9318de8d7fSPeter AvalosValid arguments are 94ce74bacaSMatthew Dillon.Cm any 95ce74bacaSMatthew Dillon(the default), 96ce74bacaSMatthew Dillon.Cm inet 9718de8d7fSPeter Avalos(use IPv4 only), or 98ce74bacaSMatthew Dillon.Cm inet6 9918de8d7fSPeter Avalos(use IPv6 only). 10018de8d7fSPeter Avalos.It Cm AllowAgentForwarding 10118de8d7fSPeter AvalosSpecifies whether 10218de8d7fSPeter Avalos.Xr ssh-agent 1 10318de8d7fSPeter Avalosforwarding is permitted. 10418de8d7fSPeter AvalosThe default is 105ce74bacaSMatthew Dillon.Cm yes . 10618de8d7fSPeter AvalosNote that disabling agent forwarding does not improve security 10718de8d7fSPeter Avalosunless users are also denied shell access, as they can always install 10818de8d7fSPeter Avalostheir own forwarders. 10918de8d7fSPeter Avalos.It Cm AllowGroups 11018de8d7fSPeter AvalosThis keyword can be followed by a list of group name patterns, separated 11118de8d7fSPeter Avalosby spaces. 11218de8d7fSPeter AvalosIf specified, login is allowed only for users whose primary 11318de8d7fSPeter Avalosgroup or supplementary group list matches one of the patterns. 11418de8d7fSPeter AvalosOnly group names are valid; a numerical group ID is not recognized. 11518de8d7fSPeter AvalosBy default, login is allowed for all groups. 1160cbfa66cSDaniel FojtThe allow/deny groups directives are processed in the following order: 11718de8d7fSPeter Avalos.Cm DenyGroups , 11818de8d7fSPeter Avalos.Cm AllowGroups . 11918de8d7fSPeter Avalos.Pp 12036e94dc5SPeter AvalosSee PATTERNS in 12118de8d7fSPeter Avalos.Xr ssh_config 5 12218de8d7fSPeter Avalosfor more information on patterns. 123*ba1276acSMatthew DillonThis keyword may appear multiple times in 124*ba1276acSMatthew Dillon.Nm 125*ba1276acSMatthew Dillonwith each instance appending to the list. 12636e94dc5SPeter Avalos.It Cm AllowStreamLocalForwarding 12736e94dc5SPeter AvalosSpecifies whether StreamLocal (Unix-domain socket) forwarding is permitted. 12836e94dc5SPeter AvalosThe available options are 129ce74bacaSMatthew Dillon.Cm yes 130ce74bacaSMatthew Dillon(the default) 13136e94dc5SPeter Avalosor 132ce74bacaSMatthew Dillon.Cm all 13336e94dc5SPeter Avalosto allow StreamLocal forwarding, 134ce74bacaSMatthew Dillon.Cm no 13536e94dc5SPeter Avalosto prevent all StreamLocal forwarding, 136ce74bacaSMatthew Dillon.Cm local 13736e94dc5SPeter Avalosto allow local (from the perspective of 13836e94dc5SPeter Avalos.Xr ssh 1 ) 13936e94dc5SPeter Avalosforwarding only or 140ce74bacaSMatthew Dillon.Cm remote 14136e94dc5SPeter Avalosto allow remote forwarding only. 14236e94dc5SPeter AvalosNote that disabling StreamLocal forwarding does not improve security unless 14336e94dc5SPeter Avalosusers are also denied shell access, as they can always install their 14436e94dc5SPeter Avalosown forwarders. 145ce74bacaSMatthew Dillon.It Cm AllowTcpForwarding 146ce74bacaSMatthew DillonSpecifies whether TCP forwarding is permitted. 147ce74bacaSMatthew DillonThe available options are 148ce74bacaSMatthew Dillon.Cm yes 149ce74bacaSMatthew Dillon(the default) 150ce74bacaSMatthew Dillonor 151ce74bacaSMatthew Dillon.Cm all 152ce74bacaSMatthew Dillonto allow TCP forwarding, 153ce74bacaSMatthew Dillon.Cm no 154ce74bacaSMatthew Dillonto prevent all TCP forwarding, 155ce74bacaSMatthew Dillon.Cm local 156ce74bacaSMatthew Dillonto allow local (from the perspective of 157ce74bacaSMatthew Dillon.Xr ssh 1 ) 158ce74bacaSMatthew Dillonforwarding only or 159ce74bacaSMatthew Dillon.Cm remote 160ce74bacaSMatthew Dillonto allow remote forwarding only. 161ce74bacaSMatthew DillonNote that disabling TCP forwarding does not improve security unless 162ce74bacaSMatthew Dillonusers are also denied shell access, as they can always install their 163ce74bacaSMatthew Dillonown forwarders. 16418de8d7fSPeter Avalos.It Cm AllowUsers 16518de8d7fSPeter AvalosThis keyword can be followed by a list of user name patterns, separated 16618de8d7fSPeter Avalosby spaces. 16718de8d7fSPeter AvalosIf specified, login is allowed only for user names that 16818de8d7fSPeter Avalosmatch one of the patterns. 16918de8d7fSPeter AvalosOnly user names are valid; a numerical user ID is not recognized. 17018de8d7fSPeter AvalosBy default, login is allowed for all users. 17118de8d7fSPeter AvalosIf the pattern takes the form USER@HOST then USER and HOST 17218de8d7fSPeter Avalosare separately checked, restricting logins to particular 17318de8d7fSPeter Avalosusers from particular hosts. 174e9778795SPeter AvalosHOST criteria may additionally contain addresses to match in CIDR 175e9778795SPeter Avalosaddress/masklen format. 1760cbfa66cSDaniel FojtThe allow/deny users directives are processed in the following order: 17718de8d7fSPeter Avalos.Cm DenyUsers , 1780cbfa66cSDaniel Fojt.Cm AllowUsers . 17918de8d7fSPeter Avalos.Pp 18036e94dc5SPeter AvalosSee PATTERNS in 18118de8d7fSPeter Avalos.Xr ssh_config 5 18218de8d7fSPeter Avalosfor more information on patterns. 183*ba1276acSMatthew DillonThis keyword may appear multiple times in 184*ba1276acSMatthew Dillon.Nm 185*ba1276acSMatthew Dillonwith each instance appending to the list. 18636e94dc5SPeter Avalos.It Cm AuthenticationMethods 18736e94dc5SPeter AvalosSpecifies the authentication methods that must be successfully completed 18836e94dc5SPeter Avalosfor a user to be granted access. 189664f4763SzrjThis option must be followed by one or more lists of comma-separated 190e9778795SPeter Avalosauthentication method names, or by the single string 191ce74bacaSMatthew Dillon.Cm any 192e9778795SPeter Avalosto indicate the default behaviour of accepting any single authentication 193e9778795SPeter Avalosmethod. 194ce74bacaSMatthew DillonIf the default is overridden, then successful authentication requires 195e9778795SPeter Avaloscompletion of every method in at least one of these lists. 19636e94dc5SPeter Avalos.Pp 197ce74bacaSMatthew DillonFor example, 198ce74bacaSMatthew Dillon.Qq publickey,password publickey,keyboard-interactive 19936e94dc5SPeter Avaloswould require the user to complete public key authentication, followed by 20036e94dc5SPeter Avaloseither password or keyboard interactive authentication. 20136e94dc5SPeter AvalosOnly methods that are next in one or more lists are offered at each stage, 202ce74bacaSMatthew Dillonso for this example it would not be possible to attempt password or 20336e94dc5SPeter Avaloskeyboard-interactive authentication before public key. 20436e94dc5SPeter Avalos.Pp 20536e94dc5SPeter AvalosFor keyboard interactive authentication it is also possible to 20636e94dc5SPeter Avalosrestrict authentication to a specific device by appending a 20736e94dc5SPeter Avaloscolon followed by the device identifier 208664f4763Szrj.Cm bsdauth 20936e94dc5SPeter Avalosor 210664f4763Szrj.Cm pam . 21136e94dc5SPeter Avalosdepending on the server configuration. 21236e94dc5SPeter AvalosFor example, 213ce74bacaSMatthew Dillon.Qq keyboard-interactive:bsdauth 21436e94dc5SPeter Avaloswould restrict keyboard interactive authentication to the 215ce74bacaSMatthew Dillon.Cm bsdauth 21636e94dc5SPeter Avalosdevice. 21736e94dc5SPeter Avalos.Pp 218ce74bacaSMatthew DillonIf the publickey method is listed more than once, 219e9778795SPeter Avalos.Xr sshd 8 220e9778795SPeter Avalosverifies that keys that have been used successfully are not reused for 221e9778795SPeter Avalossubsequent authentications. 222ce74bacaSMatthew DillonFor example, 223ce74bacaSMatthew Dillon.Qq publickey,publickey 224ce74bacaSMatthew Dillonrequires successful authentication using two different public keys. 225e9778795SPeter Avalos.Pp 22636e94dc5SPeter AvalosNote that each authentication method listed should also be explicitly enabled 22736e94dc5SPeter Avalosin the configuration. 228ce74bacaSMatthew Dillon.Pp 229ce74bacaSMatthew DillonThe available authentication methods are: 230ce74bacaSMatthew Dillon.Qq gssapi-with-mic , 231ce74bacaSMatthew Dillon.Qq hostbased , 232ce74bacaSMatthew Dillon.Qq keyboard-interactive , 233ce74bacaSMatthew Dillon.Qq none 234ce74bacaSMatthew Dillon(used for access to password-less accounts when 235664f4763Szrj.Cm PermitEmptyPasswords 236ce74bacaSMatthew Dillonis enabled), 237ce74bacaSMatthew Dillon.Qq password 238ce74bacaSMatthew Dillonand 239ce74bacaSMatthew Dillon.Qq publickey . 24036e94dc5SPeter Avalos.It Cm AuthorizedKeysCommand 24136e94dc5SPeter AvalosSpecifies a program to be used to look up the user's public keys. 242e9778795SPeter AvalosThe program must be owned by root, not writable by group or others and 243e9778795SPeter Avalosspecified by an absolute path. 244e9778795SPeter AvalosArguments to 245e9778795SPeter Avalos.Cm AuthorizedKeysCommand 246ce74bacaSMatthew Dillonaccept the tokens described in the 247ce74bacaSMatthew Dillon.Sx TOKENS 248ce74bacaSMatthew Dillonsection. 249ce74bacaSMatthew DillonIf no arguments are specified then the username of the target user is used. 250e9778795SPeter Avalos.Pp 251e9778795SPeter AvalosThe program should produce on standard output zero or 252ce74bacaSMatthew Dillonmore lines of authorized_keys output (see 253ce74bacaSMatthew Dillon.Sx AUTHORIZED_KEYS 254ce74bacaSMatthew Dillonin 25536e94dc5SPeter Avalos.Xr sshd 8 ) . 256ce74bacaSMatthew Dillon.Cm AuthorizedKeysCommand 2570cbfa66cSDaniel Fojtis tried after the usual 25836e94dc5SPeter Avalos.Cm AuthorizedKeysFile 2590cbfa66cSDaniel Fojtfiles and will not be executed if a matching key is found there. 260ce74bacaSMatthew DillonBy default, no 261ce74bacaSMatthew Dillon.Cm AuthorizedKeysCommand 262ce74bacaSMatthew Dillonis run. 26336e94dc5SPeter Avalos.It Cm AuthorizedKeysCommandUser 264ce74bacaSMatthew DillonSpecifies the user under whose account the 265ce74bacaSMatthew Dillon.Cm AuthorizedKeysCommand 266ce74bacaSMatthew Dillonis run. 26736e94dc5SPeter AvalosIt is recommended to use a dedicated user that has no other role on the host 26836e94dc5SPeter Avalosthan running authorized keys commands. 269e9778795SPeter AvalosIf 270e9778795SPeter Avalos.Cm AuthorizedKeysCommand 271e9778795SPeter Avalosis specified but 272e9778795SPeter Avalos.Cm AuthorizedKeysCommandUser 273e9778795SPeter Avalosis not, then 274e9778795SPeter Avalos.Xr sshd 8 275e9778795SPeter Avaloswill refuse to start. 27618de8d7fSPeter Avalos.It Cm AuthorizedKeysFile 277ce74bacaSMatthew DillonSpecifies the file that contains the public keys used for user authentication. 2780cbfa66cSDaniel FojtThe format is described in the AUTHORIZED_KEYS FILE FORMAT section of 279856ea928SPeter Avalos.Xr sshd 8 . 280ce74bacaSMatthew DillonArguments to 28118de8d7fSPeter Avalos.Cm AuthorizedKeysFile 282ce74bacaSMatthew Dillonaccept the tokens described in the 283ce74bacaSMatthew Dillon.Sx TOKENS 284ce74bacaSMatthew Dillonsection. 28518de8d7fSPeter AvalosAfter expansion, 28618de8d7fSPeter Avalos.Cm AuthorizedKeysFile 28718de8d7fSPeter Avalosis taken to be an absolute path or one relative to the user's home 28818de8d7fSPeter Avalosdirectory. 2891c188a7fSPeter AvalosMultiple files may be listed, separated by whitespace. 290e9778795SPeter AvalosAlternately this option may be set to 291ce74bacaSMatthew Dillon.Cm none 292e9778795SPeter Avalosto skip checking for user keys in files. 29318de8d7fSPeter AvalosThe default is 294ce74bacaSMatthew Dillon.Qq .ssh/authorized_keys .ssh/authorized_keys2 . 295e9778795SPeter Avalos.It Cm AuthorizedPrincipalsCommand 296e9778795SPeter AvalosSpecifies a program to be used to generate the list of allowed 297e9778795SPeter Avaloscertificate principals as per 298e9778795SPeter Avalos.Cm AuthorizedPrincipalsFile . 299e9778795SPeter AvalosThe program must be owned by root, not writable by group or others and 300e9778795SPeter Avalosspecified by an absolute path. 301e9778795SPeter AvalosArguments to 302e9778795SPeter Avalos.Cm AuthorizedPrincipalsCommand 303ce74bacaSMatthew Dillonaccept the tokens described in the 304ce74bacaSMatthew Dillon.Sx TOKENS 305ce74bacaSMatthew Dillonsection. 306ce74bacaSMatthew DillonIf no arguments are specified then the username of the target user is used. 307e9778795SPeter Avalos.Pp 308e9778795SPeter AvalosThe program should produce on standard output zero or 309e9778795SPeter Avalosmore lines of 310e9778795SPeter Avalos.Cm AuthorizedPrincipalsFile 311e9778795SPeter Avalosoutput. 312e9778795SPeter AvalosIf either 313e9778795SPeter Avalos.Cm AuthorizedPrincipalsCommand 314e9778795SPeter Avalosor 315e9778795SPeter Avalos.Cm AuthorizedPrincipalsFile 316e9778795SPeter Avalosis specified, then certificates offered by the client for authentication 317e9778795SPeter Avalosmust contain a principal that is listed. 318ce74bacaSMatthew DillonBy default, no 319ce74bacaSMatthew Dillon.Cm AuthorizedPrincipalsCommand 320ce74bacaSMatthew Dillonis run. 321e9778795SPeter Avalos.It Cm AuthorizedPrincipalsCommandUser 322ce74bacaSMatthew DillonSpecifies the user under whose account the 323ce74bacaSMatthew Dillon.Cm AuthorizedPrincipalsCommand 324ce74bacaSMatthew Dillonis run. 325e9778795SPeter AvalosIt is recommended to use a dedicated user that has no other role on the host 326e9778795SPeter Avalosthan running authorized principals commands. 327e9778795SPeter AvalosIf 328e9778795SPeter Avalos.Cm AuthorizedPrincipalsCommand 329e9778795SPeter Avalosis specified but 330e9778795SPeter Avalos.Cm AuthorizedPrincipalsCommandUser 331e9778795SPeter Avalosis not, then 332e9778795SPeter Avalos.Xr sshd 8 333e9778795SPeter Avaloswill refuse to start. 334856ea928SPeter Avalos.It Cm AuthorizedPrincipalsFile 335856ea928SPeter AvalosSpecifies a file that lists principal names that are accepted for 336856ea928SPeter Avaloscertificate authentication. 337856ea928SPeter AvalosWhen using certificates signed by a key listed in 338856ea928SPeter Avalos.Cm TrustedUserCAKeys , 339856ea928SPeter Avalosthis file lists names, one of which must appear in the certificate for it 340856ea928SPeter Avalosto be accepted for authentication. 341ce74bacaSMatthew DillonNames are listed one per line preceded by key options (as described in 342ce74bacaSMatthew Dillon.Sx AUTHORIZED_KEYS FILE FORMAT 343ce74bacaSMatthew Dillonin 344856ea928SPeter Avalos.Xr sshd 8 ) . 345856ea928SPeter AvalosEmpty lines and comments starting with 346856ea928SPeter Avalos.Ql # 347856ea928SPeter Avalosare ignored. 348856ea928SPeter Avalos.Pp 349ce74bacaSMatthew DillonArguments to 350856ea928SPeter Avalos.Cm AuthorizedPrincipalsFile 351ce74bacaSMatthew Dillonaccept the tokens described in the 352ce74bacaSMatthew Dillon.Sx TOKENS 353ce74bacaSMatthew Dillonsection. 354856ea928SPeter AvalosAfter expansion, 355856ea928SPeter Avalos.Cm AuthorizedPrincipalsFile 356ce74bacaSMatthew Dillonis taken to be an absolute path or one relative to the user's home directory. 35799e85e0dSPeter AvalosThe default is 358ce74bacaSMatthew Dillon.Cm none , 35999e85e0dSPeter Avalosi.e. not to use a principals file \(en in this case, the username 360856ea928SPeter Avalosof the user must appear in a certificate's principals list for it to be 361856ea928SPeter Avalosaccepted. 362ce74bacaSMatthew Dillon.Pp 363856ea928SPeter AvalosNote that 364856ea928SPeter Avalos.Cm AuthorizedPrincipalsFile 365856ea928SPeter Avalosis only used when authentication proceeds using a CA listed in 366856ea928SPeter Avalos.Cm TrustedUserCAKeys 367856ea928SPeter Avalosand is not consulted for certification authorities trusted via 368856ea928SPeter Avalos.Pa ~/.ssh/authorized_keys , 369856ea928SPeter Avalosthough the 370856ea928SPeter Avalos.Cm principals= 371856ea928SPeter Avaloskey option offers a similar facility (see 372856ea928SPeter Avalos.Xr sshd 8 373856ea928SPeter Avalosfor details). 37418de8d7fSPeter Avalos.It Cm Banner 37518de8d7fSPeter AvalosThe contents of the specified file are sent to the remote user before 37618de8d7fSPeter Avalosauthentication is allowed. 37718de8d7fSPeter AvalosIf the argument is 378ce74bacaSMatthew Dillon.Cm none 37918de8d7fSPeter Avalosthen no banner is displayed. 38018de8d7fSPeter AvalosBy default, no banner is displayed. 381664f4763Szrj.It Cm CASignatureAlgorithms 382664f4763SzrjSpecifies which algorithms are allowed for signing of certificates 383664f4763Szrjby certificate authorities (CAs). 384664f4763SzrjThe default is: 385664f4763Szrj.Bd -literal -offset indent 38650a69bb5SSascha Wildnerssh-ed25519,ecdsa-sha2-nistp256, 38750a69bb5SSascha Wildnerecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 38850a69bb5SSascha Wildnersk-ssh-ed25519@openssh.com, 38950a69bb5SSascha Wildnersk-ecdsa-sha2-nistp256@openssh.com, 39050a69bb5SSascha Wildnerrsa-sha2-512,rsa-sha2-256 391664f4763Szrj.Ed 392664f4763Szrj.Pp 39350a69bb5SSascha WildnerIf the specified list begins with a 39450a69bb5SSascha Wildner.Sq + 39550a69bb5SSascha Wildnercharacter, then the specified algorithms will be appended to the default set 39650a69bb5SSascha Wildnerinstead of replacing them. 39750a69bb5SSascha WildnerIf the specified list begins with a 39850a69bb5SSascha Wildner.Sq - 39950a69bb5SSascha Wildnercharacter, then the specified algorithms (including wildcards) will be removed 40050a69bb5SSascha Wildnerfrom the default set instead of replacing them. 40150a69bb5SSascha Wildner.Pp 402664f4763SzrjCertificates signed using other algorithms will not be accepted for 403664f4763Szrjpublic key or host-based authentication. 404*ba1276acSMatthew Dillon.It Cm ChannelTimeout 405*ba1276acSMatthew DillonSpecifies whether and how quickly 406*ba1276acSMatthew Dillon.Xr sshd 8 407*ba1276acSMatthew Dillonshould close inactive channels. 408*ba1276acSMatthew DillonTimeouts are specified as one or more 409*ba1276acSMatthew Dillon.Dq type=interval 410*ba1276acSMatthew Dillonpairs separated by whitespace, where the 411*ba1276acSMatthew Dillon.Dq type 412*ba1276acSMatthew Dillonmust be the special keyword 413*ba1276acSMatthew Dillon.Dq global 414*ba1276acSMatthew Dillonor a channel type name from the list below, optionally containing 415*ba1276acSMatthew Dillonwildcard characters. 416*ba1276acSMatthew Dillon.Pp 417*ba1276acSMatthew DillonThe timeout value 418*ba1276acSMatthew Dillon.Dq interval 419*ba1276acSMatthew Dillonis specified in seconds or may use any of the units documented in the 420*ba1276acSMatthew Dillon.Sx TIME FORMATS 421*ba1276acSMatthew Dillonsection. 422*ba1276acSMatthew DillonFor example, 423*ba1276acSMatthew Dillon.Dq session=5m 424*ba1276acSMatthew Dillonwould cause interactive sessions to terminate after five minutes of 425*ba1276acSMatthew Dilloninactivity. 426*ba1276acSMatthew DillonSpecifying a zero value disables the inactivity timeout. 427*ba1276acSMatthew Dillon.Pp 428*ba1276acSMatthew DillonThe special timeout 429*ba1276acSMatthew Dillon.Dq global 430*ba1276acSMatthew Dillonapplies to all active channels, taken together. 431*ba1276acSMatthew DillonTraffic on any active channel will reset the timeout, but when the timeout 432*ba1276acSMatthew Dillonexpires then all open channels will be closed. 433*ba1276acSMatthew DillonNote that this global timeout is not matched by wildcards and must be 434*ba1276acSMatthew Dillonspecified explicitly. 435*ba1276acSMatthew Dillon.Pp 436*ba1276acSMatthew DillonThe available channel type names include: 437*ba1276acSMatthew Dillon.Bl -tag -width Ds 438*ba1276acSMatthew Dillon.It Cm agent-connection 439*ba1276acSMatthew DillonOpen connections to 440*ba1276acSMatthew Dillon.Xr ssh-agent 1 . 441*ba1276acSMatthew Dillon.It Cm direct-tcpip , Cm direct-streamlocal@openssh.com 442*ba1276acSMatthew DillonOpen TCP or Unix socket (respectively) connections that have 443*ba1276acSMatthew Dillonbeen established from a 444*ba1276acSMatthew Dillon.Xr ssh 1 445*ba1276acSMatthew Dillonlocal forwarding, i.e.\& 446*ba1276acSMatthew Dillon.Cm LocalForward 447*ba1276acSMatthew Dillonor 448*ba1276acSMatthew Dillon.Cm DynamicForward . 449*ba1276acSMatthew Dillon.It Cm forwarded-tcpip , Cm forwarded-streamlocal@openssh.com 450*ba1276acSMatthew DillonOpen TCP or Unix socket (respectively) connections that have been 451*ba1276acSMatthew Dillonestablished to a 452*ba1276acSMatthew Dillon.Xr sshd 8 453*ba1276acSMatthew Dillonlistening on behalf of a 454*ba1276acSMatthew Dillon.Xr ssh 1 455*ba1276acSMatthew Dillonremote forwarding, i.e.\& 456*ba1276acSMatthew Dillon.Cm RemoteForward . 457*ba1276acSMatthew Dillon.It Cm session 458*ba1276acSMatthew DillonThe interactive main session, including shell session, command execution, 459*ba1276acSMatthew Dillon.Xr scp 1 , 460*ba1276acSMatthew Dillon.Xr sftp 1 , 461*ba1276acSMatthew Dillonetc. 462*ba1276acSMatthew Dillon.It Cm tun-connection 463*ba1276acSMatthew DillonOpen 464*ba1276acSMatthew Dillon.Cm TunnelForward 465*ba1276acSMatthew Dillonconnections. 466*ba1276acSMatthew Dillon.It Cm x11-connection 467*ba1276acSMatthew DillonOpen X11 forwarding sessions. 468*ba1276acSMatthew Dillon.El 469*ba1276acSMatthew Dillon.Pp 470*ba1276acSMatthew DillonNote that in all the above cases, terminating an inactive session does not 471*ba1276acSMatthew Dillonguarantee to remove all resources associated with the session, e.g. shell 472*ba1276acSMatthew Dillonprocesses or X11 clients relating to the session may continue to execute. 473*ba1276acSMatthew Dillon.Pp 474*ba1276acSMatthew DillonMoreover, terminating an inactive channel or session does not necessarily 475*ba1276acSMatthew Dillonclose the SSH connection, nor does it prevent a client from 476*ba1276acSMatthew Dillonrequesting another channel of the same type. 477*ba1276acSMatthew DillonIn particular, expiring an inactive forwarding session does not prevent 478*ba1276acSMatthew Dillonanother identical forwarding from being subsequently created. 479*ba1276acSMatthew Dillon.Pp 480*ba1276acSMatthew DillonThe default is not to expire channels of any type for inactivity. 48118de8d7fSPeter Avalos.It Cm ChrootDirectory 482856ea928SPeter AvalosSpecifies the pathname of a directory to 48318de8d7fSPeter Avalos.Xr chroot 2 48418de8d7fSPeter Avalosto after authentication. 485e9778795SPeter AvalosAt session startup 486e9778795SPeter Avalos.Xr sshd 8 487e9778795SPeter Avaloschecks that all components of the pathname are root-owned directories 488*ba1276acSMatthew Dillonwhich are not writable by group or others. 48940c002afSPeter AvalosAfter the chroot, 49040c002afSPeter Avalos.Xr sshd 8 49140c002afSPeter Avaloschanges the working directory to the user's home directory. 492ce74bacaSMatthew DillonArguments to 493ce74bacaSMatthew Dillon.Cm ChrootDirectory 494ce74bacaSMatthew Dillonaccept the tokens described in the 495ce74bacaSMatthew Dillon.Sx TOKENS 496ce74bacaSMatthew Dillonsection. 49718de8d7fSPeter Avalos.Pp 49818de8d7fSPeter AvalosThe 49918de8d7fSPeter Avalos.Cm ChrootDirectory 50018de8d7fSPeter Avalosmust contain the necessary files and directories to support the 50140c002afSPeter Avalosuser's session. 50218de8d7fSPeter AvalosFor an interactive session this requires at least a shell, typically 50318de8d7fSPeter Avalos.Xr sh 1 , 50418de8d7fSPeter Avalosand basic 50518de8d7fSPeter Avalos.Pa /dev 50618de8d7fSPeter Avalosnodes such as 50718de8d7fSPeter Avalos.Xr null 4 , 50818de8d7fSPeter Avalos.Xr zero 4 , 50918de8d7fSPeter Avalos.Xr stdin 4 , 51018de8d7fSPeter Avalos.Xr stdout 4 , 51118de8d7fSPeter Avalos.Xr stderr 4 , 51218de8d7fSPeter Avalosand 51318de8d7fSPeter Avalos.Xr tty 4 51418de8d7fSPeter Avalosdevices. 515ce74bacaSMatthew DillonFor file transfer sessions using SFTP 516ce74bacaSMatthew Dillonno additional configuration of the environment is necessary if the in-process 517ce74bacaSMatthew Dillonsftp-server is used, 51836e94dc5SPeter Avalosthough sessions which use logging may require 51940c002afSPeter Avalos.Pa /dev/log 52036e94dc5SPeter Avalosinside the chroot directory on some operating systems (see 52140c002afSPeter Avalos.Xr sftp-server 8 52218de8d7fSPeter Avalosfor details). 52318de8d7fSPeter Avalos.Pp 524e9778795SPeter AvalosFor safety, it is very important that the directory hierarchy be 525e9778795SPeter Avalosprevented from modification by other processes on the system (especially 526e9778795SPeter Avalosthose outside the jail). 527e9778795SPeter AvalosMisconfiguration can lead to unsafe environments which 528e9778795SPeter Avalos.Xr sshd 8 529e9778795SPeter Avaloscannot detect. 530e9778795SPeter Avalos.Pp 531e9778795SPeter AvalosThe default is 532ce74bacaSMatthew Dillon.Cm none , 533e9778795SPeter Avalosindicating not to 53418de8d7fSPeter Avalos.Xr chroot 2 . 53518de8d7fSPeter Avalos.It Cm Ciphers 536e9778795SPeter AvalosSpecifies the ciphers allowed. 53718de8d7fSPeter AvalosMultiple ciphers must be comma-separated. 5380cbfa66cSDaniel FojtIf the specified list begins with a 539e9778795SPeter Avalos.Sq + 540e9778795SPeter Avaloscharacter, then the specified ciphers will be appended to the default set 541e9778795SPeter Avalosinstead of replacing them. 5420cbfa66cSDaniel FojtIf the specified list begins with a 543ce74bacaSMatthew Dillon.Sq - 544ce74bacaSMatthew Dilloncharacter, then the specified ciphers (including wildcards) will be removed 545ce74bacaSMatthew Dillonfrom the default set instead of replacing them. 5460cbfa66cSDaniel FojtIf the specified list begins with a 5470cbfa66cSDaniel Fojt.Sq ^ 5480cbfa66cSDaniel Fojtcharacter, then the specified ciphers will be placed at the head of the 5490cbfa66cSDaniel Fojtdefault set. 550e9778795SPeter Avalos.Pp 55136e94dc5SPeter AvalosThe supported ciphers are: 55236e94dc5SPeter Avalos.Pp 55336e94dc5SPeter Avalos.Bl -item -compact -offset indent 55436e94dc5SPeter Avalos.It 55536e94dc5SPeter Avalos3des-cbc 55636e94dc5SPeter Avalos.It 55736e94dc5SPeter Avalosaes128-cbc 55836e94dc5SPeter Avalos.It 55936e94dc5SPeter Avalosaes192-cbc 56036e94dc5SPeter Avalos.It 56136e94dc5SPeter Avalosaes256-cbc 56236e94dc5SPeter Avalos.It 56336e94dc5SPeter Avalosaes128-ctr 56436e94dc5SPeter Avalos.It 56536e94dc5SPeter Avalosaes192-ctr 56636e94dc5SPeter Avalos.It 56736e94dc5SPeter Avalosaes256-ctr 56836e94dc5SPeter Avalos.It 56936e94dc5SPeter Avalosaes128-gcm@openssh.com 57036e94dc5SPeter Avalos.It 57136e94dc5SPeter Avalosaes256-gcm@openssh.com 57236e94dc5SPeter Avalos.It 57336e94dc5SPeter Avaloschacha20-poly1305@openssh.com 57436e94dc5SPeter Avalos.El 57536e94dc5SPeter Avalos.Pp 57618de8d7fSPeter AvalosThe default is: 57736e94dc5SPeter Avalos.Bd -literal -offset indent 578e9778795SPeter Avaloschacha20-poly1305@openssh.com, 57936e94dc5SPeter Avalosaes128-ctr,aes192-ctr,aes256-ctr, 580e9778795SPeter Avalosaes128-gcm@openssh.com,aes256-gcm@openssh.com 58118de8d7fSPeter Avalos.Ed 58236e94dc5SPeter Avalos.Pp 583ce74bacaSMatthew DillonThe list of available ciphers may also be obtained using 584ce74bacaSMatthew Dillon.Qq ssh -Q cipher . 58518de8d7fSPeter Avalos.It Cm ClientAliveCountMax 586ce74bacaSMatthew DillonSets the number of client alive messages which may be sent without 58718de8d7fSPeter Avalos.Xr sshd 8 58818de8d7fSPeter Avalosreceiving any messages back from the client. 58918de8d7fSPeter AvalosIf this threshold is reached while client alive messages are being sent, 59018de8d7fSPeter Avalossshd will disconnect the client, terminating the session. 59118de8d7fSPeter AvalosIt is important to note that the use of client alive messages is very 59218de8d7fSPeter Avalosdifferent from 593ce74bacaSMatthew Dillon.Cm TCPKeepAlive . 59418de8d7fSPeter AvalosThe client alive messages are sent through the encrypted channel 59518de8d7fSPeter Avalosand therefore will not be spoofable. 59618de8d7fSPeter AvalosThe TCP keepalive option enabled by 59718de8d7fSPeter Avalos.Cm TCPKeepAlive 59818de8d7fSPeter Avalosis spoofable. 59918de8d7fSPeter AvalosThe client alive mechanism is valuable when the client or 6000cbfa66cSDaniel Fojtserver depend on knowing when a connection has become unresponsive. 60118de8d7fSPeter Avalos.Pp 60218de8d7fSPeter AvalosThe default value is 3. 60318de8d7fSPeter AvalosIf 60418de8d7fSPeter Avalos.Cm ClientAliveInterval 605ce74bacaSMatthew Dillonis set to 15, and 60618de8d7fSPeter Avalos.Cm ClientAliveCountMax 60718de8d7fSPeter Avalosis left at the default, unresponsive SSH clients 60818de8d7fSPeter Avaloswill be disconnected after approximately 45 seconds. 6090cbfa66cSDaniel FojtSetting a zero 6100cbfa66cSDaniel Fojt.Cm ClientAliveCountMax 6110cbfa66cSDaniel Fojtdisables connection termination. 61218de8d7fSPeter Avalos.It Cm ClientAliveInterval 61318de8d7fSPeter AvalosSets a timeout interval in seconds after which if no data has been received 61418de8d7fSPeter Avalosfrom the client, 61518de8d7fSPeter Avalos.Xr sshd 8 61618de8d7fSPeter Avaloswill send a message through the encrypted 61718de8d7fSPeter Avaloschannel to request a response from the client. 61818de8d7fSPeter AvalosThe default 61918de8d7fSPeter Avalosis 0, indicating that these messages will not be sent to the client. 62018de8d7fSPeter Avalos.It Cm Compression 621ce74bacaSMatthew DillonSpecifies whether compression is enabled after 62218de8d7fSPeter Avalosthe user has authenticated successfully. 62318de8d7fSPeter AvalosThe argument must be 624ce74bacaSMatthew Dillon.Cm yes , 625ce74bacaSMatthew Dillon.Cm delayed 626ce74bacaSMatthew Dillon(a legacy synonym for 627ce74bacaSMatthew Dillon.Cm yes ) 62818de8d7fSPeter Avalosor 629ce74bacaSMatthew Dillon.Cm no . 63018de8d7fSPeter AvalosThe default is 631ce74bacaSMatthew Dillon.Cm yes . 63218de8d7fSPeter Avalos.It Cm DenyGroups 63318de8d7fSPeter AvalosThis keyword can be followed by a list of group name patterns, separated 63418de8d7fSPeter Avalosby spaces. 63518de8d7fSPeter AvalosLogin is disallowed for users whose primary group or supplementary 63618de8d7fSPeter Avalosgroup list matches one of the patterns. 63718de8d7fSPeter AvalosOnly group names are valid; a numerical group ID is not recognized. 63818de8d7fSPeter AvalosBy default, login is allowed for all groups. 6390cbfa66cSDaniel FojtThe allow/deny groups directives are processed in the following order: 64018de8d7fSPeter Avalos.Cm DenyGroups , 64118de8d7fSPeter Avalos.Cm AllowGroups . 64218de8d7fSPeter Avalos.Pp 64336e94dc5SPeter AvalosSee PATTERNS in 64418de8d7fSPeter Avalos.Xr ssh_config 5 64518de8d7fSPeter Avalosfor more information on patterns. 646*ba1276acSMatthew DillonThis keyword may appear multiple times in 647*ba1276acSMatthew Dillon.Nm 648*ba1276acSMatthew Dillonwith each instance appending to the list. 64918de8d7fSPeter Avalos.It Cm DenyUsers 65018de8d7fSPeter AvalosThis keyword can be followed by a list of user name patterns, separated 65118de8d7fSPeter Avalosby spaces. 65218de8d7fSPeter AvalosLogin is disallowed for user names that match one of the patterns. 65318de8d7fSPeter AvalosOnly user names are valid; a numerical user ID is not recognized. 65418de8d7fSPeter AvalosBy default, login is allowed for all users. 65518de8d7fSPeter AvalosIf the pattern takes the form USER@HOST then USER and HOST 65618de8d7fSPeter Avalosare separately checked, restricting logins to particular 65718de8d7fSPeter Avalosusers from particular hosts. 658e9778795SPeter AvalosHOST criteria may additionally contain addresses to match in CIDR 659e9778795SPeter Avalosaddress/masklen format. 6600cbfa66cSDaniel FojtThe allow/deny users directives are processed in the following order: 66118de8d7fSPeter Avalos.Cm DenyUsers , 6620cbfa66cSDaniel Fojt.Cm AllowUsers . 66318de8d7fSPeter Avalos.Pp 66436e94dc5SPeter AvalosSee PATTERNS in 66518de8d7fSPeter Avalos.Xr ssh_config 5 66618de8d7fSPeter Avalosfor more information on patterns. 667*ba1276acSMatthew DillonThis keyword may appear multiple times in 668*ba1276acSMatthew Dillon.Nm 669*ba1276acSMatthew Dillonwith each instance appending to the list. 670ce74bacaSMatthew Dillon.It Cm DisableForwarding 671ce74bacaSMatthew DillonDisables all forwarding features, including X11, 672ce74bacaSMatthew Dillon.Xr ssh-agent 1 , 673ce74bacaSMatthew DillonTCP and StreamLocal. 674ce74bacaSMatthew DillonThis option overrides all other forwarding-related options and may 675ce74bacaSMatthew Dillonsimplify restricted configurations. 676ce74bacaSMatthew Dillon.It Cm ExposeAuthInfo 677ce74bacaSMatthew DillonWrites a temporary file containing a list of authentication methods and 678ce74bacaSMatthew Dillonpublic credentials (e.g. keys) used to authenticate the user. 679ce74bacaSMatthew DillonThe location of the file is exposed to the user session through the 680ce74bacaSMatthew Dillon.Ev SSH_USER_AUTH 681ce74bacaSMatthew Dillonenvironment variable. 682ce74bacaSMatthew DillonThe default is 683ce74bacaSMatthew Dillon.Cm no . 684e9778795SPeter Avalos.It Cm FingerprintHash 685e9778795SPeter AvalosSpecifies the hash algorithm used when logging key fingerprints. 686e9778795SPeter AvalosValid options are: 687ce74bacaSMatthew Dillon.Cm md5 688e9778795SPeter Avalosand 689ce74bacaSMatthew Dillon.Cm sha256 . 690e9778795SPeter AvalosThe default is 691ce74bacaSMatthew Dillon.Cm sha256 . 69218de8d7fSPeter Avalos.It Cm ForceCommand 69318de8d7fSPeter AvalosForces the execution of the command specified by 69418de8d7fSPeter Avalos.Cm ForceCommand , 69518de8d7fSPeter Avalosignoring any command supplied by the client and 69618de8d7fSPeter Avalos.Pa ~/.ssh/rc 69718de8d7fSPeter Avalosif present. 69818de8d7fSPeter AvalosThe command is invoked by using the user's login shell with the -c option. 69918de8d7fSPeter AvalosThis applies to shell, command, or subsystem execution. 70018de8d7fSPeter AvalosIt is most useful inside a 70118de8d7fSPeter Avalos.Cm Match 70218de8d7fSPeter Avalosblock. 70318de8d7fSPeter AvalosThe command originally supplied by the client is available in the 70418de8d7fSPeter Avalos.Ev SSH_ORIGINAL_COMMAND 70518de8d7fSPeter Avalosenvironment variable. 70618de8d7fSPeter AvalosSpecifying a command of 707ce74bacaSMatthew Dillon.Cm internal-sftp 708ce74bacaSMatthew Dillonwill force the use of an in-process SFTP server that requires no support 70918de8d7fSPeter Avalosfiles when used with 71018de8d7fSPeter Avalos.Cm ChrootDirectory . 711e9778795SPeter AvalosThe default is 712ce74bacaSMatthew Dillon.Cm none . 71318de8d7fSPeter Avalos.It Cm GatewayPorts 71418de8d7fSPeter AvalosSpecifies whether remote hosts are allowed to connect to ports 71518de8d7fSPeter Avalosforwarded for the client. 71618de8d7fSPeter AvalosBy default, 71718de8d7fSPeter Avalos.Xr sshd 8 71818de8d7fSPeter Avalosbinds remote port forwardings to the loopback address. 71918de8d7fSPeter AvalosThis prevents other remote hosts from connecting to forwarded ports. 72018de8d7fSPeter Avalos.Cm GatewayPorts 72118de8d7fSPeter Avaloscan be used to specify that sshd 72218de8d7fSPeter Avalosshould allow remote port forwardings to bind to non-loopback addresses, thus 72318de8d7fSPeter Avalosallowing other hosts to connect. 72418de8d7fSPeter AvalosThe argument may be 725ce74bacaSMatthew Dillon.Cm no 72618de8d7fSPeter Avalosto force remote port forwardings to be available to the local host only, 727ce74bacaSMatthew Dillon.Cm yes 72818de8d7fSPeter Avalosto force remote port forwardings to bind to the wildcard address, or 729ce74bacaSMatthew Dillon.Cm clientspecified 73018de8d7fSPeter Avalosto allow the client to select the address to which the forwarding is bound. 73118de8d7fSPeter AvalosThe default is 732ce74bacaSMatthew Dillon.Cm no . 73318de8d7fSPeter Avalos.It Cm GSSAPIAuthentication 73418de8d7fSPeter AvalosSpecifies whether user authentication based on GSSAPI is allowed. 73518de8d7fSPeter AvalosThe default is 736ce74bacaSMatthew Dillon.Cm no . 73718de8d7fSPeter Avalos.It Cm GSSAPICleanupCredentials 73818de8d7fSPeter AvalosSpecifies whether to automatically destroy the user's credentials cache 73918de8d7fSPeter Avaloson logout. 74018de8d7fSPeter AvalosThe default is 741ce74bacaSMatthew Dillon.Cm yes . 742e9778795SPeter Avalos.It Cm GSSAPIStrictAcceptorCheck 743e9778795SPeter AvalosDetermines whether to be strict about the identity of the GSSAPI acceptor 744e9778795SPeter Avalosa client authenticates against. 745e9778795SPeter AvalosIf set to 746ce74bacaSMatthew Dillon.Cm yes 747ce74bacaSMatthew Dillonthen the client must authenticate against the host 748e9778795SPeter Avalosservice on the current hostname. 749e9778795SPeter AvalosIf set to 750ce74bacaSMatthew Dillon.Cm no 751e9778795SPeter Avalosthen the client may authenticate against any service key stored in the 752e9778795SPeter Avalosmachine's default store. 753e9778795SPeter AvalosThis facility is provided to assist with operation on multi homed machines. 754e9778795SPeter AvalosThe default is 755ce74bacaSMatthew Dillon.Cm yes . 75650a69bb5SSascha Wildner.It Cm HostbasedAcceptedAlgorithms 75750a69bb5SSascha WildnerSpecifies the signature algorithms that will be accepted for hostbased 75850a69bb5SSascha Wildnerauthentication as a list of comma-separated patterns. 7590cbfa66cSDaniel FojtAlternately if the specified list begins with a 760e9778795SPeter Avalos.Sq + 76150a69bb5SSascha Wildnercharacter, then the specified signature algorithms will be appended to 76250a69bb5SSascha Wildnerthe default set instead of replacing them. 7630cbfa66cSDaniel FojtIf the specified list begins with a 764ce74bacaSMatthew Dillon.Sq - 76550a69bb5SSascha Wildnercharacter, then the specified signature algorithms (including wildcards) 76650a69bb5SSascha Wildnerwill be removed from the default set instead of replacing them. 7670cbfa66cSDaniel FojtIf the specified list begins with a 7680cbfa66cSDaniel Fojt.Sq ^ 76950a69bb5SSascha Wildnercharacter, then the specified signature algorithms will be placed at 77050a69bb5SSascha Wildnerthe head of the default set. 771e9778795SPeter AvalosThe default for this option is: 772e9778795SPeter Avalos.Bd -literal -offset 3n 77350a69bb5SSascha Wildnerssh-ed25519-cert-v01@openssh.com, 774e9778795SPeter Avalosecdsa-sha2-nistp256-cert-v01@openssh.com, 775e9778795SPeter Avalosecdsa-sha2-nistp384-cert-v01@openssh.com, 776e9778795SPeter Avalosecdsa-sha2-nistp521-cert-v01@openssh.com, 7770cbfa66cSDaniel Fojtsk-ssh-ed25519-cert-v01@openssh.com, 77850a69bb5SSascha Wildnersk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 7790cbfa66cSDaniel Fojtrsa-sha2-512-cert-v01@openssh.com, 7800cbfa66cSDaniel Fojtrsa-sha2-256-cert-v01@openssh.com, 78150a69bb5SSascha Wildnerssh-ed25519, 782e9778795SPeter Avalosecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 78350a69bb5SSascha Wildnersk-ssh-ed25519@openssh.com, 7840cbfa66cSDaniel Fojtsk-ecdsa-sha2-nistp256@openssh.com, 785ee116499SAntonio Huete Jimenezrsa-sha2-512,rsa-sha2-256 786e9778795SPeter Avalos.Ed 787e9778795SPeter Avalos.Pp 78850a69bb5SSascha WildnerThe list of available signature algorithms may also be obtained using 78950a69bb5SSascha Wildner.Qq ssh -Q HostbasedAcceptedAlgorithms . 79050a69bb5SSascha WildnerThis was formerly named HostbasedAcceptedKeyTypes. 79118de8d7fSPeter Avalos.It Cm HostbasedAuthentication 79218de8d7fSPeter AvalosSpecifies whether rhosts or /etc/hosts.equiv authentication together 79318de8d7fSPeter Avaloswith successful public key client host authentication is allowed 79418de8d7fSPeter Avalos(host-based authentication). 79518de8d7fSPeter AvalosThe default is 796ce74bacaSMatthew Dillon.Cm no . 79718de8d7fSPeter Avalos.It Cm HostbasedUsesNameFromPacketOnly 79818de8d7fSPeter AvalosSpecifies whether or not the server will attempt to perform a reverse 79918de8d7fSPeter Avalosname lookup when matching the name in the 80018de8d7fSPeter Avalos.Pa ~/.shosts , 80118de8d7fSPeter Avalos.Pa ~/.rhosts , 80218de8d7fSPeter Avalosand 80318de8d7fSPeter Avalos.Pa /etc/hosts.equiv 80418de8d7fSPeter Avalosfiles during 80518de8d7fSPeter Avalos.Cm HostbasedAuthentication . 80618de8d7fSPeter AvalosA setting of 807ce74bacaSMatthew Dillon.Cm yes 80818de8d7fSPeter Avalosmeans that 80918de8d7fSPeter Avalos.Xr sshd 8 81018de8d7fSPeter Avalosuses the name supplied by the client rather than 81118de8d7fSPeter Avalosattempting to resolve the name from the TCP connection itself. 81218de8d7fSPeter AvalosThe default is 813ce74bacaSMatthew Dillon.Cm no . 814856ea928SPeter Avalos.It Cm HostCertificate 815856ea928SPeter AvalosSpecifies a file containing a public host certificate. 816856ea928SPeter AvalosThe certificate's public key must match a private host key already specified 817856ea928SPeter Avalosby 818856ea928SPeter Avalos.Cm HostKey . 819856ea928SPeter AvalosThe default behaviour of 820856ea928SPeter Avalos.Xr sshd 8 821856ea928SPeter Avalosis not to load any certificates. 82218de8d7fSPeter Avalos.It Cm HostKey 82318de8d7fSPeter AvalosSpecifies a file containing a private host key 82418de8d7fSPeter Avalosused by SSH. 825ce74bacaSMatthew DillonThe defaults are 82636e94dc5SPeter Avalos.Pa /etc/ssh/ssh_host_ecdsa_key , 82736e94dc5SPeter Avalos.Pa /etc/ssh/ssh_host_ed25519_key 82818de8d7fSPeter Avalosand 829ce74bacaSMatthew Dillon.Pa /etc/ssh/ssh_host_rsa_key . 830e9778795SPeter Avalos.Pp 83118de8d7fSPeter AvalosNote that 83218de8d7fSPeter Avalos.Xr sshd 8 833e9778795SPeter Avaloswill refuse to use a file if it is group/world-accessible 834e9778795SPeter Avalosand that the 835e9778795SPeter Avalos.Cm HostKeyAlgorithms 836e9778795SPeter Avalosoption restricts which of the keys are actually used by 837e9778795SPeter Avalos.Xr sshd 8 . 838e9778795SPeter Avalos.Pp 83918de8d7fSPeter AvalosIt is possible to have multiple host key files. 84036e94dc5SPeter AvalosIt is also possible to specify public host key files instead. 84136e94dc5SPeter AvalosIn this case operations on the private key will be delegated 84236e94dc5SPeter Avalosto an 84336e94dc5SPeter Avalos.Xr ssh-agent 1 . 84436e94dc5SPeter Avalos.It Cm HostKeyAgent 84536e94dc5SPeter AvalosIdentifies the UNIX-domain socket used to communicate 84636e94dc5SPeter Avaloswith an agent that has access to the private host keys. 847e9778795SPeter AvalosIf the string 848ce74bacaSMatthew Dillon.Qq SSH_AUTH_SOCK 84936e94dc5SPeter Avalosis specified, the location of the socket will be read from the 85036e94dc5SPeter Avalos.Ev SSH_AUTH_SOCK 85136e94dc5SPeter Avalosenvironment variable. 852e9778795SPeter Avalos.It Cm HostKeyAlgorithms 85350a69bb5SSascha WildnerSpecifies the host key signature algorithms 854e9778795SPeter Avalosthat the server offers. 855e9778795SPeter AvalosThe default for this option is: 856e9778795SPeter Avalos.Bd -literal -offset 3n 85750a69bb5SSascha Wildnerssh-ed25519-cert-v01@openssh.com, 858e9778795SPeter Avalosecdsa-sha2-nistp256-cert-v01@openssh.com, 859e9778795SPeter Avalosecdsa-sha2-nistp384-cert-v01@openssh.com, 860e9778795SPeter Avalosecdsa-sha2-nistp521-cert-v01@openssh.com, 8610cbfa66cSDaniel Fojtsk-ssh-ed25519-cert-v01@openssh.com, 86250a69bb5SSascha Wildnersk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 8630cbfa66cSDaniel Fojtrsa-sha2-512-cert-v01@openssh.com, 8640cbfa66cSDaniel Fojtrsa-sha2-256-cert-v01@openssh.com, 86550a69bb5SSascha Wildnerssh-ed25519, 866e9778795SPeter Avalosecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 86750a69bb5SSascha Wildnersk-ssh-ed25519@openssh.com, 8680cbfa66cSDaniel Fojtsk-ecdsa-sha2-nistp256@openssh.com, 869ee116499SAntonio Huete Jimenezrsa-sha2-512,rsa-sha2-256 870e9778795SPeter Avalos.Ed 871e9778795SPeter Avalos.Pp 87250a69bb5SSascha WildnerThe list of available signature algorithms may also be obtained using 8730cbfa66cSDaniel Fojt.Qq ssh -Q HostKeyAlgorithms . 87418de8d7fSPeter Avalos.It Cm IgnoreRhosts 8750cbfa66cSDaniel FojtSpecifies whether to ignore per-user 87618de8d7fSPeter Avalos.Pa .rhosts 87718de8d7fSPeter Avalosand 87818de8d7fSPeter Avalos.Pa .shosts 8790cbfa66cSDaniel Fojtfiles during 88018de8d7fSPeter Avalos.Cm HostbasedAuthentication . 8810cbfa66cSDaniel FojtThe system-wide 88218de8d7fSPeter Avalos.Pa /etc/hosts.equiv 88318de8d7fSPeter Avalosand 88418de8d7fSPeter Avalos.Pa /etc/shosts.equiv 8850cbfa66cSDaniel Fojtare still used regardless of this setting. 8860cbfa66cSDaniel Fojt.Pp 8870cbfa66cSDaniel FojtAccepted values are 8880cbfa66cSDaniel Fojt.Cm yes 8890cbfa66cSDaniel Fojt(the default) to ignore all per-user files, 8900cbfa66cSDaniel Fojt.Cm shosts-only 8910cbfa66cSDaniel Fojtto allow the use of 8920cbfa66cSDaniel Fojt.Pa .shosts 8930cbfa66cSDaniel Fojtbut to ignore 8940cbfa66cSDaniel Fojt.Pa .rhosts 8950cbfa66cSDaniel Fojtor 8960cbfa66cSDaniel Fojt.Cm no 8970cbfa66cSDaniel Fojtto allow both 8980cbfa66cSDaniel Fojt.Pa .shosts 8990cbfa66cSDaniel Fojtand 9000cbfa66cSDaniel Fojt.Pa rhosts . 90118de8d7fSPeter Avalos.It Cm IgnoreUserKnownHosts 90218de8d7fSPeter AvalosSpecifies whether 90318de8d7fSPeter Avalos.Xr sshd 8 90418de8d7fSPeter Avalosshould ignore the user's 90518de8d7fSPeter Avalos.Pa ~/.ssh/known_hosts 90618de8d7fSPeter Avalosduring 907664f4763Szrj.Cm HostbasedAuthentication 908664f4763Szrjand use only the system-wide known hosts file 909ee116499SAntonio Huete Jimenez.Pa /etc/ssh/ssh_known_hosts . 91018de8d7fSPeter AvalosThe default is 9110cbfa66cSDaniel Fojt.Dq no . 9120cbfa66cSDaniel Fojt.It Cm Include 9130cbfa66cSDaniel FojtInclude the specified configuration file(s). 9140cbfa66cSDaniel FojtMultiple pathnames may be specified and each pathname may contain 9150cbfa66cSDaniel Fojt.Xr glob 7 91650a69bb5SSascha Wildnerwildcards that will be expanded and processed in lexical order. 9170cbfa66cSDaniel FojtFiles without absolute paths are assumed to be in 9180cbfa66cSDaniel Fojt.Pa /etc/ssh . 9190cbfa66cSDaniel FojtAn 9200cbfa66cSDaniel Fojt.Cm Include 9210cbfa66cSDaniel Fojtdirective may appear inside a 9220cbfa66cSDaniel Fojt.Cm Match 9230cbfa66cSDaniel Fojtblock 9240cbfa66cSDaniel Fojtto perform conditional inclusion. 9259f304aafSPeter Avalos.It Cm IPQoS 9269f304aafSPeter AvalosSpecifies the IPv4 type-of-service or DSCP class for the connection. 9279f304aafSPeter AvalosAccepted values are 928ce74bacaSMatthew Dillon.Cm af11 , 929ce74bacaSMatthew Dillon.Cm af12 , 930ce74bacaSMatthew Dillon.Cm af13 , 931ce74bacaSMatthew Dillon.Cm af21 , 932ce74bacaSMatthew Dillon.Cm af22 , 933ce74bacaSMatthew Dillon.Cm af23 , 934ce74bacaSMatthew Dillon.Cm af31 , 935ce74bacaSMatthew Dillon.Cm af32 , 936ce74bacaSMatthew Dillon.Cm af33 , 937ce74bacaSMatthew Dillon.Cm af41 , 938ce74bacaSMatthew Dillon.Cm af42 , 939ce74bacaSMatthew Dillon.Cm af43 , 940ce74bacaSMatthew Dillon.Cm cs0 , 941ce74bacaSMatthew Dillon.Cm cs1 , 942ce74bacaSMatthew Dillon.Cm cs2 , 943ce74bacaSMatthew Dillon.Cm cs3 , 944ce74bacaSMatthew Dillon.Cm cs4 , 945ce74bacaSMatthew Dillon.Cm cs5 , 946ce74bacaSMatthew Dillon.Cm cs6 , 947ce74bacaSMatthew Dillon.Cm cs7 , 948ce74bacaSMatthew Dillon.Cm ef , 9490cbfa66cSDaniel Fojt.Cm le , 950ce74bacaSMatthew Dillon.Cm lowdelay , 951ce74bacaSMatthew Dillon.Cm throughput , 952ce74bacaSMatthew Dillon.Cm reliability , 953ce74bacaSMatthew Dillona numeric value, or 954ce74bacaSMatthew Dillon.Cm none 955ce74bacaSMatthew Dillonto use the operating system default. 9569f304aafSPeter AvalosThis option may take one or two arguments, separated by whitespace. 9579f304aafSPeter AvalosIf one argument is specified, it is used as the packet class unconditionally. 9589f304aafSPeter AvalosIf two values are specified, the first is automatically selected for 9599f304aafSPeter Avalosinteractive sessions and the second for non-interactive sessions. 9609f304aafSPeter AvalosThe default is 961664f4763Szrj.Cm af21 962664f4763Szrj(Low-Latency Data) 9639f304aafSPeter Avalosfor interactive sessions and 964664f4763Szrj.Cm cs1 965664f4763Szrj(Lower Effort) 9669f304aafSPeter Avalosfor non-interactive sessions. 96736e94dc5SPeter Avalos.It Cm KbdInteractiveAuthentication 96836e94dc5SPeter AvalosSpecifies whether to allow keyboard-interactive authentication. 96950a69bb5SSascha WildnerAll authentication styles from 97050a69bb5SSascha Wildner.Xr login.conf 5 97150a69bb5SSascha Wildnerare supported. 97250a69bb5SSascha WildnerThe default is 97350a69bb5SSascha Wildner.Cm yes . 97436e94dc5SPeter AvalosThe argument to this keyword must be 975ce74bacaSMatthew Dillon.Cm yes 97636e94dc5SPeter Avalosor 977ce74bacaSMatthew Dillon.Cm no . 97836e94dc5SPeter Avalos.Cm ChallengeResponseAuthentication 97950a69bb5SSascha Wildneris a deprecated alias for this. 98018de8d7fSPeter Avalos.It Cm KerberosAuthentication 98118de8d7fSPeter AvalosSpecifies whether the password provided by the user for 98218de8d7fSPeter Avalos.Cm PasswordAuthentication 98318de8d7fSPeter Avaloswill be validated through the Kerberos KDC. 98418de8d7fSPeter AvalosTo use this option, the server needs a 98518de8d7fSPeter AvalosKerberos servtab which allows the verification of the KDC's identity. 98618de8d7fSPeter AvalosThe default is 987ce74bacaSMatthew Dillon.Cm no . 98818de8d7fSPeter Avalos.It Cm KerberosGetAFSToken 98918de8d7fSPeter AvalosIf AFS is active and the user has a Kerberos 5 TGT, attempt to acquire 99018de8d7fSPeter Avalosan AFS token before accessing the user's home directory. 99118de8d7fSPeter AvalosThe default is 992ce74bacaSMatthew Dillon.Cm no . 99318de8d7fSPeter Avalos.It Cm KerberosOrLocalPasswd 99418de8d7fSPeter AvalosIf password authentication through Kerberos fails then 99518de8d7fSPeter Avalosthe password will be validated via any additional local mechanism 99618de8d7fSPeter Avalossuch as 99718de8d7fSPeter Avalos.Pa /etc/passwd . 99818de8d7fSPeter AvalosThe default is 999ce74bacaSMatthew Dillon.Cm yes . 100018de8d7fSPeter Avalos.It Cm KerberosTicketCleanup 100118de8d7fSPeter AvalosSpecifies whether to automatically destroy the user's ticket cache 100218de8d7fSPeter Avalosfile on logout. 100318de8d7fSPeter AvalosThe default is 1004ce74bacaSMatthew Dillon.Cm yes . 10059f304aafSPeter Avalos.It Cm KexAlgorithms 1006*ba1276acSMatthew DillonSpecifies the permitted KEX (Key Exchange) algorithms that the server will 1007*ba1276acSMatthew Dillonoffer to clients. 1008*ba1276acSMatthew DillonThe ordering of this list is not important, as the client specifies the 1009*ba1276acSMatthew Dillonpreference order. 10109f304aafSPeter AvalosMultiple algorithms must be comma-separated. 1011*ba1276acSMatthew Dillon.Pp 1012*ba1276acSMatthew DillonIf the specified list begins with a 1013e9778795SPeter Avalos.Sq + 101450a69bb5SSascha Wildnercharacter, then the specified algorithms will be appended to the default set 1015e9778795SPeter Avalosinstead of replacing them. 10160cbfa66cSDaniel FojtIf the specified list begins with a 1017ce74bacaSMatthew Dillon.Sq - 101850a69bb5SSascha Wildnercharacter, then the specified algorithms (including wildcards) will be removed 1019ce74bacaSMatthew Dillonfrom the default set instead of replacing them. 10200cbfa66cSDaniel FojtIf the specified list begins with a 10210cbfa66cSDaniel Fojt.Sq ^ 102250a69bb5SSascha Wildnercharacter, then the specified algorithms will be placed at the head of the 10230cbfa66cSDaniel Fojtdefault set. 1024*ba1276acSMatthew Dillon.Pp 102536e94dc5SPeter AvalosThe supported algorithms are: 102636e94dc5SPeter Avalos.Pp 102736e94dc5SPeter Avalos.Bl -item -compact -offset indent 102836e94dc5SPeter Avalos.It 1029ce74bacaSMatthew Dilloncurve25519-sha256 1030ce74bacaSMatthew Dillon.It 103136e94dc5SPeter Avaloscurve25519-sha256@libssh.org 103236e94dc5SPeter Avalos.It 103336e94dc5SPeter Avalosdiffie-hellman-group1-sha1 103436e94dc5SPeter Avalos.It 103536e94dc5SPeter Avalosdiffie-hellman-group14-sha1 103636e94dc5SPeter Avalos.It 1037664f4763Szrjdiffie-hellman-group14-sha256 1038664f4763Szrj.It 1039664f4763Szrjdiffie-hellman-group16-sha512 1040664f4763Szrj.It 1041664f4763Szrjdiffie-hellman-group18-sha512 1042664f4763Szrj.It 104336e94dc5SPeter Avalosdiffie-hellman-group-exchange-sha1 104436e94dc5SPeter Avalos.It 104536e94dc5SPeter Avalosdiffie-hellman-group-exchange-sha256 104636e94dc5SPeter Avalos.It 104736e94dc5SPeter Avalosecdh-sha2-nistp256 104836e94dc5SPeter Avalos.It 104936e94dc5SPeter Avalosecdh-sha2-nistp384 105036e94dc5SPeter Avalos.It 105136e94dc5SPeter Avalosecdh-sha2-nistp521 10520cbfa66cSDaniel Fojt.It 105350a69bb5SSascha Wildnersntrup761x25519-sha512@openssh.com 105436e94dc5SPeter Avalos.El 105536e94dc5SPeter Avalos.Pp 105636e94dc5SPeter AvalosThe default is: 105736e94dc5SPeter Avalos.Bd -literal -offset indent 1058ee116499SAntonio Huete Jimenezsntrup761x25519-sha512@openssh.com, 1059ce74bacaSMatthew Dilloncurve25519-sha256,curve25519-sha256@libssh.org, 106036e94dc5SPeter Avalosecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 106136e94dc5SPeter Avalosdiffie-hellman-group-exchange-sha256, 1062664f4763Szrjdiffie-hellman-group16-sha512,diffie-hellman-group18-sha512, 10630cbfa66cSDaniel Fojtdiffie-hellman-group14-sha256 106436e94dc5SPeter Avalos.Ed 1065e9778795SPeter Avalos.Pp 1066*ba1276acSMatthew DillonThe list of supported key exchange algorithms may also be obtained using 10670cbfa66cSDaniel Fojt.Qq ssh -Q KexAlgorithms . 106818de8d7fSPeter Avalos.It Cm ListenAddress 106918de8d7fSPeter AvalosSpecifies the local addresses 107018de8d7fSPeter Avalos.Xr sshd 8 107118de8d7fSPeter Avalosshould listen on. 107218de8d7fSPeter AvalosThe following forms may be used: 107318de8d7fSPeter Avalos.Pp 107418de8d7fSPeter Avalos.Bl -item -offset indent -compact 107518de8d7fSPeter Avalos.It 107618de8d7fSPeter Avalos.Cm ListenAddress 107718de8d7fSPeter Avalos.Sm off 1078664f4763Szrj.Ar hostname | address 107918de8d7fSPeter Avalos.Sm on 1080664f4763Szrj.Op Cm rdomain Ar domain 108118de8d7fSPeter Avalos.It 108218de8d7fSPeter Avalos.Cm ListenAddress 108318de8d7fSPeter Avalos.Sm off 1084664f4763Szrj.Ar hostname : port 108518de8d7fSPeter Avalos.Sm on 1086664f4763Szrj.Op Cm rdomain Ar domain 108718de8d7fSPeter Avalos.It 108818de8d7fSPeter Avalos.Cm ListenAddress 108918de8d7fSPeter Avalos.Sm off 1090664f4763Szrj.Ar IPv4_address : port 109118de8d7fSPeter Avalos.Sm on 1092664f4763Szrj.Op Cm rdomain Ar domain 1093664f4763Szrj.It 1094664f4763Szrj.Cm ListenAddress 1095664f4763Szrj.Sm off 1096664f4763Szrj.Oo Ar hostname | address Oc : Ar port 1097664f4763Szrj.Sm on 1098664f4763Szrj.Op Cm rdomain Ar domain 109918de8d7fSPeter Avalos.El 110018de8d7fSPeter Avalos.Pp 1101664f4763SzrjThe optional 1102664f4763Szrj.Cm rdomain 1103664f4763Szrjqualifier requests 1104664f4763Szrj.Xr sshd 8 1105664f4763Szrjlisten in an explicit routing domain. 110618de8d7fSPeter AvalosIf 110718de8d7fSPeter Avalos.Ar port 110818de8d7fSPeter Avalosis not specified, 1109e9778795SPeter Avalossshd will listen on the address and all 111018de8d7fSPeter Avalos.Cm Port 111118de8d7fSPeter Avalosoptions specified. 1112664f4763SzrjThe default is to listen on all local addresses on the current default 1113664f4763Szrjrouting domain. 111418de8d7fSPeter AvalosMultiple 111518de8d7fSPeter Avalos.Cm ListenAddress 111618de8d7fSPeter Avalosoptions are permitted. 1117664f4763SzrjFor more information on routing domains, see 1118664f4763Szrj.Xr rdomain 4 . 111918de8d7fSPeter Avalos.It Cm LoginGraceTime 112018de8d7fSPeter AvalosThe server disconnects after this time if the user has not 112118de8d7fSPeter Avalossuccessfully logged in. 112218de8d7fSPeter AvalosIf the value is 0, there is no time limit. 112318de8d7fSPeter AvalosThe default is 120 seconds. 112418de8d7fSPeter Avalos.It Cm LogLevel 112518de8d7fSPeter AvalosGives the verbosity level that is used when logging messages from 112618de8d7fSPeter Avalos.Xr sshd 8 . 112718de8d7fSPeter AvalosThe possible values are: 112818de8d7fSPeter AvalosQUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. 112918de8d7fSPeter AvalosThe default is INFO. 113018de8d7fSPeter AvalosDEBUG and DEBUG1 are equivalent. 113118de8d7fSPeter AvalosDEBUG2 and DEBUG3 each specify higher levels of debugging output. 113218de8d7fSPeter AvalosLogging with a DEBUG level violates the privacy of users and is not recommended. 113350a69bb5SSascha Wildner.It Cm LogVerbose 1134*ba1276acSMatthew DillonSpecify one or more overrides to 1135*ba1276acSMatthew Dillon.Cm LogLevel . 113650a69bb5SSascha WildnerAn override consists of a pattern lists that matches the source file, function 113750a69bb5SSascha Wildnerand line number to force detailed logging for. 113850a69bb5SSascha WildnerFor example, an override pattern of: 113950a69bb5SSascha Wildner.Bd -literal -offset indent 114050a69bb5SSascha Wildnerkex.c:*:1000,*:kex_exchange_identification():*,packet.c:* 114150a69bb5SSascha Wildner.Ed 114250a69bb5SSascha Wildner.Pp 114350a69bb5SSascha Wildnerwould enable detailed logging for line 1000 of 114450a69bb5SSascha Wildner.Pa kex.c , 114550a69bb5SSascha Wildnereverything in the 114650a69bb5SSascha Wildner.Fn kex_exchange_identification 114750a69bb5SSascha Wildnerfunction, and all code in the 114850a69bb5SSascha Wildner.Pa packet.c 114950a69bb5SSascha Wildnerfile. 115050a69bb5SSascha WildnerThis option is intended for debugging and no overrides are enabled by default. 115118de8d7fSPeter Avalos.It Cm MACs 115218de8d7fSPeter AvalosSpecifies the available MAC (message authentication code) algorithms. 1153e9778795SPeter AvalosThe MAC algorithm is used for data integrity protection. 115418de8d7fSPeter AvalosMultiple algorithms must be comma-separated. 11550cbfa66cSDaniel FojtIf the specified list begins with a 1156e9778795SPeter Avalos.Sq + 1157e9778795SPeter Avaloscharacter, then the specified algorithms will be appended to the default set 1158e9778795SPeter Avalosinstead of replacing them. 11590cbfa66cSDaniel FojtIf the specified list begins with a 1160ce74bacaSMatthew Dillon.Sq - 1161ce74bacaSMatthew Dilloncharacter, then the specified algorithms (including wildcards) will be removed 1162ce74bacaSMatthew Dillonfrom the default set instead of replacing them. 11630cbfa66cSDaniel FojtIf the specified list begins with a 11640cbfa66cSDaniel Fojt.Sq ^ 11650cbfa66cSDaniel Fojtcharacter, then the specified algorithms will be placed at the head of the 11660cbfa66cSDaniel Fojtdefault set. 1167e9778795SPeter Avalos.Pp 116836e94dc5SPeter AvalosThe algorithms that contain 1169ce74bacaSMatthew Dillon.Qq -etm 117036e94dc5SPeter Avaloscalculate the MAC after encryption (encrypt-then-mac). 117136e94dc5SPeter AvalosThese are considered safer and their use recommended. 117236e94dc5SPeter AvalosThe supported MACs are: 117336e94dc5SPeter Avalos.Pp 117436e94dc5SPeter Avalos.Bl -item -compact -offset indent 117536e94dc5SPeter Avalos.It 117636e94dc5SPeter Avaloshmac-md5 117736e94dc5SPeter Avalos.It 117836e94dc5SPeter Avaloshmac-md5-96 117936e94dc5SPeter Avalos.It 118036e94dc5SPeter Avaloshmac-sha1 118136e94dc5SPeter Avalos.It 118236e94dc5SPeter Avaloshmac-sha1-96 118336e94dc5SPeter Avalos.It 118436e94dc5SPeter Avaloshmac-sha2-256 118536e94dc5SPeter Avalos.It 118636e94dc5SPeter Avaloshmac-sha2-512 118736e94dc5SPeter Avalos.It 118836e94dc5SPeter Avalosumac-64@openssh.com 118936e94dc5SPeter Avalos.It 119036e94dc5SPeter Avalosumac-128@openssh.com 119136e94dc5SPeter Avalos.It 119236e94dc5SPeter Avaloshmac-md5-etm@openssh.com 119336e94dc5SPeter Avalos.It 119436e94dc5SPeter Avaloshmac-md5-96-etm@openssh.com 119536e94dc5SPeter Avalos.It 119636e94dc5SPeter Avaloshmac-sha1-etm@openssh.com 119736e94dc5SPeter Avalos.It 119836e94dc5SPeter Avaloshmac-sha1-96-etm@openssh.com 119936e94dc5SPeter Avalos.It 120036e94dc5SPeter Avaloshmac-sha2-256-etm@openssh.com 120136e94dc5SPeter Avalos.It 120236e94dc5SPeter Avaloshmac-sha2-512-etm@openssh.com 120336e94dc5SPeter Avalos.It 120436e94dc5SPeter Avalosumac-64-etm@openssh.com 120536e94dc5SPeter Avalos.It 120636e94dc5SPeter Avalosumac-128-etm@openssh.com 120736e94dc5SPeter Avalos.El 120836e94dc5SPeter Avalos.Pp 120918de8d7fSPeter AvalosThe default is: 121018de8d7fSPeter Avalos.Bd -literal -offset indent 121136e94dc5SPeter Avalosumac-64-etm@openssh.com,umac-128-etm@openssh.com, 121236e94dc5SPeter Avaloshmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, 1213e9778795SPeter Avaloshmac-sha1-etm@openssh.com, 121436e94dc5SPeter Avalosumac-64@openssh.com,umac-128@openssh.com, 1215e9778795SPeter Avaloshmac-sha2-256,hmac-sha2-512,hmac-sha1 121618de8d7fSPeter Avalos.Ed 1217e9778795SPeter Avalos.Pp 1218ce74bacaSMatthew DillonThe list of available MAC algorithms may also be obtained using 1219ce74bacaSMatthew Dillon.Qq ssh -Q mac . 122018de8d7fSPeter Avalos.It Cm Match 122118de8d7fSPeter AvalosIntroduces a conditional block. 122218de8d7fSPeter AvalosIf all of the criteria on the 122318de8d7fSPeter Avalos.Cm Match 122418de8d7fSPeter Avalosline are satisfied, the keywords on the following lines override those 122518de8d7fSPeter Avalosset in the global section of the config file, until either another 122618de8d7fSPeter Avalos.Cm Match 122718de8d7fSPeter Avalosline or the end of the file. 122836e94dc5SPeter AvalosIf a keyword appears in multiple 122936e94dc5SPeter Avalos.Cm Match 1230e9778795SPeter Avalosblocks that are satisfied, only the first instance of the keyword is 123136e94dc5SPeter Avalosapplied. 123218de8d7fSPeter Avalos.Pp 123318de8d7fSPeter AvalosThe arguments to 123418de8d7fSPeter Avalos.Cm Match 123536e94dc5SPeter Avalosare one or more criteria-pattern pairs or the single token 123636e94dc5SPeter Avalos.Cm All 123736e94dc5SPeter Avaloswhich matches all criteria. 123818de8d7fSPeter AvalosThe available criteria are 123918de8d7fSPeter Avalos.Cm User , 124018de8d7fSPeter Avalos.Cm Group , 124118de8d7fSPeter Avalos.Cm Host , 124299e85e0dSPeter Avalos.Cm LocalAddress , 124399e85e0dSPeter Avalos.Cm LocalPort , 1244664f4763Szrj.Cm RDomain , 124518de8d7fSPeter Avalosand 1246664f4763Szrj.Cm Address 1247664f4763Szrj(with 1248664f4763Szrj.Cm RDomain 1249664f4763Szrjrepresenting the 1250664f4763Szrj.Xr rdomain 4 1251664f4763Szrjon which the connection was received). 1252664f4763Szrj.Pp 125318de8d7fSPeter AvalosThe match patterns may consist of single entries or comma-separated 125418de8d7fSPeter Avaloslists and may use the wildcard and negation operators described in the 1255ce74bacaSMatthew Dillon.Sx PATTERNS 1256ce74bacaSMatthew Dillonsection of 125718de8d7fSPeter Avalos.Xr ssh_config 5 . 125818de8d7fSPeter Avalos.Pp 125918de8d7fSPeter AvalosThe patterns in an 126018de8d7fSPeter Avalos.Cm Address 126118de8d7fSPeter Avaloscriteria may additionally contain addresses to match in CIDR 1262ce74bacaSMatthew Dillonaddress/masklen format, 1263ce74bacaSMatthew Dillonsuch as 192.0.2.0/24 or 2001:db8::/32. 126418de8d7fSPeter AvalosNote that the mask length provided must be consistent with the address - 126518de8d7fSPeter Avalosit is an error to specify a mask length that is too long for the address 126618de8d7fSPeter Avalosor one with bits set in this host portion of the address. 1267ce74bacaSMatthew DillonFor example, 192.0.2.0/33 and 192.0.2.0/8, respectively. 126818de8d7fSPeter Avalos.Pp 126918de8d7fSPeter AvalosOnly a subset of keywords may be used on the lines following a 127018de8d7fSPeter Avalos.Cm Match 127118de8d7fSPeter Avaloskeyword. 127218de8d7fSPeter AvalosAvailable keywords are 127399e85e0dSPeter Avalos.Cm AcceptEnv , 1274cb5eb4f1SPeter Avalos.Cm AllowAgentForwarding , 127599e85e0dSPeter Avalos.Cm AllowGroups , 1276e9778795SPeter Avalos.Cm AllowStreamLocalForwarding , 127718de8d7fSPeter Avalos.Cm AllowTcpForwarding , 127899e85e0dSPeter Avalos.Cm AllowUsers , 127936e94dc5SPeter Avalos.Cm AuthenticationMethods , 128036e94dc5SPeter Avalos.Cm AuthorizedKeysCommand , 128136e94dc5SPeter Avalos.Cm AuthorizedKeysCommandUser , 1282856ea928SPeter Avalos.Cm AuthorizedKeysFile , 1283e9778795SPeter Avalos.Cm AuthorizedPrincipalsCommand , 1284e9778795SPeter Avalos.Cm AuthorizedPrincipalsCommandUser , 1285856ea928SPeter Avalos.Cm AuthorizedPrincipalsFile , 128618de8d7fSPeter Avalos.Cm Banner , 1287ee116499SAntonio Huete Jimenez.Cm CASignatureAlgorithms , 1288*ba1276acSMatthew Dillon.Cm ChannelTimeout , 128918de8d7fSPeter Avalos.Cm ChrootDirectory , 1290ce74bacaSMatthew Dillon.Cm ClientAliveCountMax , 1291ce74bacaSMatthew Dillon.Cm ClientAliveInterval , 129299e85e0dSPeter Avalos.Cm DenyGroups , 129399e85e0dSPeter Avalos.Cm DenyUsers , 129450a69bb5SSascha Wildner.Cm DisableForwarding , 1295ee116499SAntonio Huete Jimenez.Cm ExposeAuthInfo , 129618de8d7fSPeter Avalos.Cm ForceCommand , 129718de8d7fSPeter Avalos.Cm GatewayPorts , 129818de8d7fSPeter Avalos.Cm GSSAPIAuthentication , 129950a69bb5SSascha Wildner.Cm HostbasedAcceptedAlgorithms , 130018de8d7fSPeter Avalos.Cm HostbasedAuthentication , 1301856ea928SPeter Avalos.Cm HostbasedUsesNameFromPacketOnly , 13020cbfa66cSDaniel Fojt.Cm IgnoreRhosts , 13030cbfa66cSDaniel Fojt.Cm Include , 1304e9778795SPeter Avalos.Cm IPQoS , 130518de8d7fSPeter Avalos.Cm KbdInteractiveAuthentication , 130618de8d7fSPeter Avalos.Cm KerberosAuthentication , 1307ce74bacaSMatthew Dillon.Cm LogLevel , 130818de8d7fSPeter Avalos.Cm MaxAuthTries , 130918de8d7fSPeter Avalos.Cm MaxSessions , 1310*ba1276acSMatthew Dillon.Cm PAMServiceName , 131118de8d7fSPeter Avalos.Cm PasswordAuthentication , 1312cb5eb4f1SPeter Avalos.Cm PermitEmptyPasswords , 1313664f4763Szrj.Cm PermitListen , 131418de8d7fSPeter Avalos.Cm PermitOpen , 131518de8d7fSPeter Avalos.Cm PermitRootLogin , 131636e94dc5SPeter Avalos.Cm PermitTTY , 1317856ea928SPeter Avalos.Cm PermitTunnel , 131836e94dc5SPeter Avalos.Cm PermitUserRC , 131950a69bb5SSascha Wildner.Cm PubkeyAcceptedAlgorithms , 1320856ea928SPeter Avalos.Cm PubkeyAuthentication , 1321ee116499SAntonio Huete Jimenez.Cm PubkeyAuthOptions , 132236e94dc5SPeter Avalos.Cm RekeyLimit , 1323e9778795SPeter Avalos.Cm RevokedKeys , 1324664f4763Szrj.Cm RDomain , 1325664f4763Szrj.Cm SetEnv , 1326e9778795SPeter Avalos.Cm StreamLocalBindMask , 1327e9778795SPeter Avalos.Cm StreamLocalBindUnlink , 1328e9778795SPeter Avalos.Cm TrustedUserCAKeys , 1329*ba1276acSMatthew Dillon.Cm UnusedConnectionTimeout , 133018de8d7fSPeter Avalos.Cm X11DisplayOffset , 1331cb5eb4f1SPeter Avalos.Cm X11Forwarding 133218de8d7fSPeter Avalosand 13330cbfa66cSDaniel Fojt.Cm X11UseLocalhost . 133418de8d7fSPeter Avalos.It Cm MaxAuthTries 133518de8d7fSPeter AvalosSpecifies the maximum number of authentication attempts permitted per 133618de8d7fSPeter Avalosconnection. 133718de8d7fSPeter AvalosOnce the number of failures reaches half this value, 133818de8d7fSPeter Avalosadditional failures are logged. 133918de8d7fSPeter AvalosThe default is 6. 134018de8d7fSPeter Avalos.It Cm MaxSessions 1341e9778795SPeter AvalosSpecifies the maximum number of open shell, login or subsystem (e.g. sftp) 1342e9778795SPeter Avalossessions permitted per network connection. 1343e9778795SPeter AvalosMultiple sessions may be established by clients that support connection 1344e9778795SPeter Avalosmultiplexing. 1345e9778795SPeter AvalosSetting 1346e9778795SPeter Avalos.Cm MaxSessions 1347e9778795SPeter Avalosto 1 will effectively disable session multiplexing, whereas setting it to 0 1348e9778795SPeter Avaloswill prevent all shell, login and subsystem sessions while still permitting 1349e9778795SPeter Avalosforwarding. 135018de8d7fSPeter AvalosThe default is 10. 135118de8d7fSPeter Avalos.It Cm MaxStartups 135218de8d7fSPeter AvalosSpecifies the maximum number of concurrent unauthenticated connections to the 135318de8d7fSPeter AvalosSSH daemon. 135418de8d7fSPeter AvalosAdditional connections will be dropped until authentication succeeds or the 135518de8d7fSPeter Avalos.Cm LoginGraceTime 135618de8d7fSPeter Avalosexpires for a connection. 135736e94dc5SPeter AvalosThe default is 10:30:100. 135818de8d7fSPeter Avalos.Pp 135918de8d7fSPeter AvalosAlternatively, random early drop can be enabled by specifying 136018de8d7fSPeter Avalosthe three colon separated values 1361ce74bacaSMatthew Dillonstart:rate:full (e.g. "10:30:60"). 136218de8d7fSPeter Avalos.Xr sshd 8 1363ce74bacaSMatthew Dillonwill refuse connection attempts with a probability of rate/100 (30%) 1364ce74bacaSMatthew Dillonif there are currently start (10) unauthenticated connections. 136518de8d7fSPeter AvalosThe probability increases linearly and all connection attempts 1366ce74bacaSMatthew Dillonare refused if the number of unauthenticated connections reaches full (60). 136750a69bb5SSascha Wildner.It Cm ModuliFile 136850a69bb5SSascha WildnerSpecifies the 136950a69bb5SSascha Wildner.Xr moduli 5 137050a69bb5SSascha Wildnerfile that contains the Diffie-Hellman groups used for the 137150a69bb5SSascha Wildner.Dq diffie-hellman-group-exchange-sha1 137250a69bb5SSascha Wildnerand 137350a69bb5SSascha Wildner.Dq diffie-hellman-group-exchange-sha256 137450a69bb5SSascha Wildnerkey exchange methods. 137550a69bb5SSascha WildnerThe default is 137650a69bb5SSascha Wildner.Pa /etc/moduli . 1377*ba1276acSMatthew Dillon.It Cm PAMServiceName 1378*ba1276acSMatthew DillonSpecifies the service name used for Pluggable Authentication Modules (PAM) 1379*ba1276acSMatthew Dillonauthentication, authorisation and session controls when 1380*ba1276acSMatthew Dillon.Cm UsePAM 1381*ba1276acSMatthew Dillonis enabled. 1382*ba1276acSMatthew DillonThe default is 1383*ba1276acSMatthew Dillon.Cm sshd . 138418de8d7fSPeter Avalos.It Cm PasswordAuthentication 138518de8d7fSPeter AvalosSpecifies whether password authentication is allowed. 138618de8d7fSPeter AvalosThe default is 1387*ba1276acSMatthew Dillon.Cm sshd . 138818de8d7fSPeter Avalos.It Cm PermitEmptyPasswords 138918de8d7fSPeter AvalosWhen password authentication is allowed, it specifies whether the 139018de8d7fSPeter Avalosserver allows login to accounts with empty password strings. 139118de8d7fSPeter AvalosThe default is 1392ce74bacaSMatthew Dillon.Cm no . 1393664f4763Szrj.It Cm PermitListen 1394664f4763SzrjSpecifies the addresses/ports on which a remote TCP port forwarding may listen. 1395664f4763SzrjThe listen specification must be one of the following forms: 1396664f4763Szrj.Pp 1397664f4763Szrj.Bl -item -offset indent -compact 1398664f4763Szrj.It 1399664f4763Szrj.Cm PermitListen 1400664f4763Szrj.Sm off 1401664f4763Szrj.Ar port 1402664f4763Szrj.Sm on 1403664f4763Szrj.It 1404664f4763Szrj.Cm PermitListen 1405664f4763Szrj.Sm off 1406664f4763Szrj.Ar host : port 1407664f4763Szrj.Sm on 1408664f4763Szrj.El 1409664f4763Szrj.Pp 1410664f4763SzrjMultiple permissions may be specified by separating them with whitespace. 1411664f4763SzrjAn argument of 1412664f4763Szrj.Cm any 1413664f4763Szrjcan be used to remove all restrictions and permit any listen requests. 1414664f4763SzrjAn argument of 1415664f4763Szrj.Cm none 1416664f4763Szrjcan be used to prohibit all listen requests. 1417664f4763SzrjThe host name may contain wildcards as described in the PATTERNS section in 1418664f4763Szrj.Xr ssh_config 5 . 1419664f4763SzrjThe wildcard 1420664f4763Szrj.Sq * 1421664f4763Szrjcan also be used in place of a port number to allow all ports. 1422664f4763SzrjBy default all port forwarding listen requests are permitted. 1423664f4763SzrjNote that the 1424664f4763Szrj.Cm GatewayPorts 1425664f4763Szrjoption may further restrict which addresses may be listened on. 1426664f4763SzrjNote also that 1427664f4763Szrj.Xr ssh 1 1428664f4763Szrjwill request a listen host of 1429664f4763Szrj.Dq localhost 1430664f4763Szrjif no listen host was specifically requested, and this name is 1431664f4763Szrjtreated differently to explicit localhost addresses of 1432664f4763Szrj.Dq 127.0.0.1 1433664f4763Szrjand 1434664f4763Szrj.Dq ::1 . 143518de8d7fSPeter Avalos.It Cm PermitOpen 143618de8d7fSPeter AvalosSpecifies the destinations to which TCP port forwarding is permitted. 143718de8d7fSPeter AvalosThe forwarding specification must be one of the following forms: 143818de8d7fSPeter Avalos.Pp 143918de8d7fSPeter Avalos.Bl -item -offset indent -compact 144018de8d7fSPeter Avalos.It 144118de8d7fSPeter Avalos.Cm PermitOpen 144218de8d7fSPeter Avalos.Sm off 144318de8d7fSPeter Avalos.Ar host : port 144418de8d7fSPeter Avalos.Sm on 144518de8d7fSPeter Avalos.It 144618de8d7fSPeter Avalos.Cm PermitOpen 144718de8d7fSPeter Avalos.Sm off 144818de8d7fSPeter Avalos.Ar IPv4_addr : port 144918de8d7fSPeter Avalos.Sm on 145018de8d7fSPeter Avalos.It 145118de8d7fSPeter Avalos.Cm PermitOpen 145218de8d7fSPeter Avalos.Sm off 145318de8d7fSPeter Avalos.Ar \&[ IPv6_addr \&] : port 145418de8d7fSPeter Avalos.Sm on 145518de8d7fSPeter Avalos.El 145618de8d7fSPeter Avalos.Pp 145718de8d7fSPeter AvalosMultiple forwards may be specified by separating them with whitespace. 145818de8d7fSPeter AvalosAn argument of 1459ce74bacaSMatthew Dillon.Cm any 146018de8d7fSPeter Avaloscan be used to remove all restrictions and permit any forwarding requests. 146199e85e0dSPeter AvalosAn argument of 1462ce74bacaSMatthew Dillon.Cm none 146399e85e0dSPeter Avaloscan be used to prohibit all forwarding requests. 1464e9778795SPeter AvalosThe wildcard 1465ce74bacaSMatthew Dillon.Sq * 14660cbfa66cSDaniel Fojtcan be used for host or port to allow all hosts or ports respectively. 14670cbfa66cSDaniel FojtOtherwise, no pattern matching or address lookups are performed on supplied 14680cbfa66cSDaniel Fojtnames. 146918de8d7fSPeter AvalosBy default all port forwarding requests are permitted. 147018de8d7fSPeter Avalos.It Cm PermitRootLogin 147118de8d7fSPeter AvalosSpecifies whether root can log in using 147218de8d7fSPeter Avalos.Xr ssh 1 . 147318de8d7fSPeter AvalosThe argument must be 1474ce74bacaSMatthew Dillon.Cm yes , 1475ce74bacaSMatthew Dillon.Cm prohibit-password , 1476ce74bacaSMatthew Dillon.Cm forced-commands-only , 147718de8d7fSPeter Avalosor 1478ce74bacaSMatthew Dillon.Cm no . 147918de8d7fSPeter AvalosThe default is 1480ce74bacaSMatthew Dillon.Cm prohibit-password . 148118de8d7fSPeter Avalos.Pp 148218de8d7fSPeter AvalosIf this option is set to 1483ce74bacaSMatthew Dillon.Cm prohibit-password 1484664f4763Szrj(or its deprecated alias, 1485664f4763Szrj.Cm without-password ) , 1486e9778795SPeter Avalospassword and keyboard-interactive authentication are disabled for root. 148718de8d7fSPeter Avalos.Pp 148818de8d7fSPeter AvalosIf this option is set to 1489ce74bacaSMatthew Dillon.Cm forced-commands-only , 149018de8d7fSPeter Avalosroot login with public key authentication will be allowed, 149118de8d7fSPeter Avalosbut only if the 149218de8d7fSPeter Avalos.Ar command 149318de8d7fSPeter Avalosoption has been specified 149418de8d7fSPeter Avalos(which may be useful for taking remote backups even if root login is 149518de8d7fSPeter Avalosnormally not allowed). 149618de8d7fSPeter AvalosAll other authentication methods are disabled for root. 149718de8d7fSPeter Avalos.Pp 149818de8d7fSPeter AvalosIf this option is set to 1499ce74bacaSMatthew Dillon.Cm no , 150018de8d7fSPeter Avalosroot is not allowed to log in. 150136e94dc5SPeter Avalos.It Cm PermitTTY 150236e94dc5SPeter AvalosSpecifies whether 150336e94dc5SPeter Avalos.Xr pty 4 150436e94dc5SPeter Avalosallocation is permitted. 150536e94dc5SPeter AvalosThe default is 1506ce74bacaSMatthew Dillon.Cm yes . 1507ce74bacaSMatthew Dillon.It Cm PermitTunnel 1508ce74bacaSMatthew DillonSpecifies whether 1509ce74bacaSMatthew Dillon.Xr tun 4 1510ce74bacaSMatthew Dillondevice forwarding is allowed. 1511ce74bacaSMatthew DillonThe argument must be 1512ce74bacaSMatthew Dillon.Cm yes , 1513ce74bacaSMatthew Dillon.Cm point-to-point 1514ce74bacaSMatthew Dillon(layer 3), 1515ce74bacaSMatthew Dillon.Cm ethernet 1516ce74bacaSMatthew Dillon(layer 2), or 1517ce74bacaSMatthew Dillon.Cm no . 1518ce74bacaSMatthew DillonSpecifying 1519ce74bacaSMatthew Dillon.Cm yes 1520ce74bacaSMatthew Dillonpermits both 1521ce74bacaSMatthew Dillon.Cm point-to-point 1522ce74bacaSMatthew Dillonand 1523ce74bacaSMatthew Dillon.Cm ethernet . 1524ce74bacaSMatthew DillonThe default is 1525ce74bacaSMatthew Dillon.Cm no . 1526ce74bacaSMatthew Dillon.Pp 1527ce74bacaSMatthew DillonIndependent of this setting, the permissions of the selected 1528ce74bacaSMatthew Dillon.Xr tun 4 1529ce74bacaSMatthew Dillondevice must allow access to the user. 153018de8d7fSPeter Avalos.It Cm PermitUserEnvironment 153118de8d7fSPeter AvalosSpecifies whether 153218de8d7fSPeter Avalos.Pa ~/.ssh/environment 153318de8d7fSPeter Avalosand 153418de8d7fSPeter Avalos.Cm environment= 153518de8d7fSPeter Avalosoptions in 153618de8d7fSPeter Avalos.Pa ~/.ssh/authorized_keys 153718de8d7fSPeter Avalosare processed by 153818de8d7fSPeter Avalos.Xr sshd 8 . 1539664f4763SzrjValid options are 1540664f4763Szrj.Cm yes , 1541664f4763Szrj.Cm no 1542664f4763Szrjor a pattern-list specifying which environment variable names to accept 1543664f4763Szrj(for example 1544664f4763Szrj.Qq LANG,LC_* ) . 154518de8d7fSPeter AvalosThe default is 1546ce74bacaSMatthew Dillon.Cm no . 154718de8d7fSPeter AvalosEnabling environment processing may enable users to bypass access 154818de8d7fSPeter Avalosrestrictions in some configurations using mechanisms such as 154918de8d7fSPeter Avalos.Ev LD_PRELOAD . 155036e94dc5SPeter Avalos.It Cm PermitUserRC 155136e94dc5SPeter AvalosSpecifies whether any 155236e94dc5SPeter Avalos.Pa ~/.ssh/rc 155336e94dc5SPeter Avalosfile is executed. 155436e94dc5SPeter AvalosThe default is 1555ce74bacaSMatthew Dillon.Cm yes . 155650a69bb5SSascha Wildner.It Cm PerSourceMaxStartups 155750a69bb5SSascha WildnerSpecifies the number of unauthenticated connections allowed from a 155850a69bb5SSascha Wildnergiven source address, or 155950a69bb5SSascha Wildner.Dq none 156050a69bb5SSascha Wildnerif there is no limit. 156150a69bb5SSascha WildnerThis limit is applied in addition to 156250a69bb5SSascha Wildner.Cm MaxStartups , 156350a69bb5SSascha Wildnerwhichever is lower. 156450a69bb5SSascha WildnerThe default is 156550a69bb5SSascha Wildner.Cm none . 156650a69bb5SSascha Wildner.It Cm PerSourceNetBlockSize 156750a69bb5SSascha WildnerSpecifies the number of bits of source address that are grouped together 156850a69bb5SSascha Wildnerfor the purposes of applying PerSourceMaxStartups limits. 156950a69bb5SSascha WildnerValues for IPv4 and optionally IPv6 may be specified, separated by a colon. 157050a69bb5SSascha WildnerThe default is 157150a69bb5SSascha Wildner.Cm 32:128 , 157250a69bb5SSascha Wildnerwhich means each address is considered individually. 1573*ba1276acSMatthew Dillon.It Cm PerSourcePenalties 1574*ba1276acSMatthew DillonControls penalties for various conditions that may represent attacks on 1575*ba1276acSMatthew Dillon.Xr sshd 8 . 1576*ba1276acSMatthew DillonIf a penalty is enforced against a client then its source address and any 1577*ba1276acSMatthew Dillonothers in the same network, as defined by 1578*ba1276acSMatthew Dillon.Cm PerSourceNetBlockSize , 1579*ba1276acSMatthew Dillonwill be refused connection for a period. 1580*ba1276acSMatthew Dillon.Pp 1581*ba1276acSMatthew DillonA penalty doesn't affect concurrent connections in progress, but multiple 1582*ba1276acSMatthew Dillonpenalties from the same source from concurrent connections will accumulate 1583*ba1276acSMatthew Dillonup to a maximum. 1584*ba1276acSMatthew DillonConversely, penalties are not applied until a minimum threshold time has been 1585*ba1276acSMatthew Dillonaccumulated. 1586*ba1276acSMatthew Dillon.Pp 1587*ba1276acSMatthew DillonPenalties are enabled by default with the default settings listed below 1588*ba1276acSMatthew Dillonbut may disabled using the 1589*ba1276acSMatthew Dillon.Cm off 1590*ba1276acSMatthew Dillonkeyword. 1591*ba1276acSMatthew DillonThe defaults may be overridden by specifying one or more of the keywords below, 1592*ba1276acSMatthew Dillonseparated by whitespace. 1593*ba1276acSMatthew DillonAll keywords accept arguments, e.g.\& 1594*ba1276acSMatthew Dillon.Qq crash:2m . 1595*ba1276acSMatthew Dillon.Bl -tag -width Ds 1596*ba1276acSMatthew Dillon.It Cm crash:duration 1597*ba1276acSMatthew DillonSpecifies how long to refuse clients that cause a crash of 1598*ba1276acSMatthew Dillon.Xr sshd 8 (default: 90s). 1599*ba1276acSMatthew Dillon.It Cm authfail:duration 1600*ba1276acSMatthew DillonSpecifies how long to refuse clients that disconnect after making one or more 1601*ba1276acSMatthew Dillonunsuccessful authentication attempts (default: 5s). 1602*ba1276acSMatthew Dillon.It Cm noauth:duration 1603*ba1276acSMatthew DillonSpecifies how long to refuse clients that disconnect without attempting 1604*ba1276acSMatthew Dillonauthentication (default: 1s). 1605*ba1276acSMatthew DillonThis timeout should be used cautiously otherwise it may penalise legitimate 1606*ba1276acSMatthew Dillonscanning tools such as 1607*ba1276acSMatthew Dillon.Xr ssh-keyscan 1 . 1608*ba1276acSMatthew Dillon.It Cm grace-exceeded:duration 1609*ba1276acSMatthew DillonSpecifies how long to refuse clients that fail to authenticate after 1610*ba1276acSMatthew Dillon.Cm LoginGraceTime 1611*ba1276acSMatthew Dillon(default: 20s). 1612*ba1276acSMatthew Dillon.It Cm max:duration 1613*ba1276acSMatthew DillonSpecifies the maximum time a particular source address range will be refused 1614*ba1276acSMatthew Dillonaccess for (default: 10m). 1615*ba1276acSMatthew DillonRepeated penalties will accumulate up to this maximum. 1616*ba1276acSMatthew Dillon.It Cm min:duration 1617*ba1276acSMatthew DillonSpecifies the minimum penalty that must accrue before enforcement begins 1618*ba1276acSMatthew Dillon(default: 15s). 1619*ba1276acSMatthew Dillon.It Cm max-sources4:number , max-sources6:number 1620*ba1276acSMatthew DillonSpecifies the maximum number of client IPv4 and IPv6 address ranges to 1621*ba1276acSMatthew Dillontrack for penalties (default: 65536 for both). 1622*ba1276acSMatthew Dillon.It Cm overflow:mode 1623*ba1276acSMatthew DillonControls how the server behaves when 1624*ba1276acSMatthew Dillon.Cm max-sources4 1625*ba1276acSMatthew Dillonor 1626*ba1276acSMatthew Dillon.Cm max-sources6 1627*ba1276acSMatthew Dillonis exceeded. 1628*ba1276acSMatthew DillonThere are two operating modes: 1629*ba1276acSMatthew Dillon.Cm deny-all , 1630*ba1276acSMatthew Dillonwhich denies all incoming connections other than those exempted via 1631*ba1276acSMatthew Dillon.Cm PerSourcePenaltyExemptList 1632*ba1276acSMatthew Dillonuntil a penalty expires, and 1633*ba1276acSMatthew Dillon.Cm permissive , 1634*ba1276acSMatthew Dillonwhich allows new connections by removing existing penalties early 1635*ba1276acSMatthew Dillon(default: permissive). 1636*ba1276acSMatthew DillonNote that client penalties below the 1637*ba1276acSMatthew Dillon.Cm min 1638*ba1276acSMatthew Dillonthreshold count against the total number of tracked penalties. 1639*ba1276acSMatthew DillonIPv4 and IPv6 addresses are tracked separately, so an overflow in one will 1640*ba1276acSMatthew Dillonnot affect the other. 1641*ba1276acSMatthew Dillon.It Cm overflow6:mode 1642*ba1276acSMatthew DillonAllows specifying a different overflow mode for IPv6 addresses. 1643*ba1276acSMatthew DillonThe default it to use the same overflow mode as was specified for IPv4. 1644*ba1276acSMatthew Dillon.El 1645*ba1276acSMatthew Dillon.It Cm PerSourcePenaltyExemptList 1646*ba1276acSMatthew DillonSpecifies a comma-separated list of addresses to exempt from penalties. 1647*ba1276acSMatthew DillonThis list may contain wildcards and CIDR address/masklen ranges. 1648*ba1276acSMatthew DillonNote that the mask length provided must be consistent with the address - 1649*ba1276acSMatthew Dillonit is an error to specify a mask length that is too long for the address 1650*ba1276acSMatthew Dillonor one with bits set in this host portion of the address. 1651*ba1276acSMatthew DillonFor example, 192.0.2.0/33 and 192.0.2.0/8, respectively. 1652*ba1276acSMatthew DillonThe default is not to exempt any addresses. 165318de8d7fSPeter Avalos.It Cm PidFile 165418de8d7fSPeter AvalosSpecifies the file that contains the process ID of the 1655e9778795SPeter AvalosSSH daemon, or 1656ce74bacaSMatthew Dillon.Cm none 1657e9778795SPeter Avalosto not write one. 165818de8d7fSPeter AvalosThe default is 165918de8d7fSPeter Avalos.Pa /var/run/sshd.pid . 166018de8d7fSPeter Avalos.It Cm Port 166118de8d7fSPeter AvalosSpecifies the port number that 166218de8d7fSPeter Avalos.Xr sshd 8 166318de8d7fSPeter Avaloslistens on. 166418de8d7fSPeter AvalosThe default is 22. 166518de8d7fSPeter AvalosMultiple options of this type are permitted. 166618de8d7fSPeter AvalosSee also 166718de8d7fSPeter Avalos.Cm ListenAddress . 166818de8d7fSPeter Avalos.It Cm PrintLastLog 166918de8d7fSPeter AvalosSpecifies whether 167018de8d7fSPeter Avalos.Xr sshd 8 167118de8d7fSPeter Avalosshould print the date and time of the last user login when a user logs 167218de8d7fSPeter Avalosin interactively. 167318de8d7fSPeter AvalosThe default is 1674ce74bacaSMatthew Dillon.Cm yes . 167518de8d7fSPeter Avalos.It Cm PrintMotd 167618de8d7fSPeter AvalosSpecifies whether 167718de8d7fSPeter Avalos.Xr sshd 8 167818de8d7fSPeter Avalosshould print 167918de8d7fSPeter Avalos.Pa /etc/motd 168018de8d7fSPeter Avaloswhen a user logs in interactively. 168118de8d7fSPeter Avalos(On some systems it is also printed by the shell, 168218de8d7fSPeter Avalos.Pa /etc/profile , 168318de8d7fSPeter Avalosor equivalent.) 168418de8d7fSPeter AvalosThe default is 1685ce74bacaSMatthew Dillon.Cm yes . 168650a69bb5SSascha Wildner.It Cm PubkeyAcceptedAlgorithms 168750a69bb5SSascha WildnerSpecifies the signature algorithms that will be accepted for public key 168850a69bb5SSascha Wildnerauthentication as a list of comma-separated patterns. 16890cbfa66cSDaniel FojtAlternately if the specified list begins with a 1690e9778795SPeter Avalos.Sq + 169150a69bb5SSascha Wildnercharacter, then the specified algorithms will be appended to the default set 1692e9778795SPeter Avalosinstead of replacing them. 16930cbfa66cSDaniel FojtIf the specified list begins with a 1694ce74bacaSMatthew Dillon.Sq - 169550a69bb5SSascha Wildnercharacter, then the specified algorithms (including wildcards) will be removed 1696ce74bacaSMatthew Dillonfrom the default set instead of replacing them. 16970cbfa66cSDaniel FojtIf the specified list begins with a 16980cbfa66cSDaniel Fojt.Sq ^ 169950a69bb5SSascha Wildnercharacter, then the specified algorithms will be placed at the head of the 17000cbfa66cSDaniel Fojtdefault set. 1701e9778795SPeter AvalosThe default for this option is: 1702e9778795SPeter Avalos.Bd -literal -offset 3n 170350a69bb5SSascha Wildnerssh-ed25519-cert-v01@openssh.com, 1704e9778795SPeter Avalosecdsa-sha2-nistp256-cert-v01@openssh.com, 1705e9778795SPeter Avalosecdsa-sha2-nistp384-cert-v01@openssh.com, 1706e9778795SPeter Avalosecdsa-sha2-nistp521-cert-v01@openssh.com, 17070cbfa66cSDaniel Fojtsk-ssh-ed25519-cert-v01@openssh.com, 170850a69bb5SSascha Wildnersk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 17090cbfa66cSDaniel Fojtrsa-sha2-512-cert-v01@openssh.com, 17100cbfa66cSDaniel Fojtrsa-sha2-256-cert-v01@openssh.com, 171150a69bb5SSascha Wildnerssh-ed25519, 1712e9778795SPeter Avalosecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 171350a69bb5SSascha Wildnersk-ssh-ed25519@openssh.com, 17140cbfa66cSDaniel Fojtsk-ecdsa-sha2-nistp256@openssh.com, 1715ee116499SAntonio Huete Jimenezrsa-sha2-512,rsa-sha2-256 1716e9778795SPeter Avalos.Ed 1717e9778795SPeter Avalos.Pp 171850a69bb5SSascha WildnerThe list of available signature algorithms may also be obtained using 171950a69bb5SSascha Wildner.Qq ssh -Q PubkeyAcceptedAlgorithms . 17200cbfa66cSDaniel Fojt.It Cm PubkeyAuthOptions 17210cbfa66cSDaniel FojtSets one or more public key authentication options. 172250a69bb5SSascha WildnerThe supported keywords are: 17230cbfa66cSDaniel Fojt.Cm none 172450a69bb5SSascha Wildner(the default; indicating no additional options are enabled), 172550a69bb5SSascha Wildner.Cm touch-required 17260cbfa66cSDaniel Fojtand 172750a69bb5SSascha Wildner.Cm verify-required . 17280cbfa66cSDaniel Fojt.Pp 17290cbfa66cSDaniel FojtThe 17300cbfa66cSDaniel Fojt.Cm touch-required 17310cbfa66cSDaniel Fojtoption causes public key authentication using a FIDO authenticator algorithm 17320cbfa66cSDaniel Fojt(i.e.\& 17330cbfa66cSDaniel Fojt.Cm ecdsa-sk 17340cbfa66cSDaniel Fojtor 17350cbfa66cSDaniel Fojt.Cm ed25519-sk ) 17360cbfa66cSDaniel Fojtto always require the signature to attest that a physically present user 17370cbfa66cSDaniel Fojtexplicitly confirmed the authentication (usually by touching the authenticator). 17380cbfa66cSDaniel FojtBy default, 17390cbfa66cSDaniel Fojt.Xr sshd 8 17400cbfa66cSDaniel Fojtrequires user presence unless overridden with an authorized_keys option. 17410cbfa66cSDaniel FojtThe 17420cbfa66cSDaniel Fojt.Cm touch-required 17430cbfa66cSDaniel Fojtflag disables this override. 174450a69bb5SSascha Wildner.Pp 174550a69bb5SSascha WildnerThe 174650a69bb5SSascha Wildner.Cm verify-required 174750a69bb5SSascha Wildneroption requires a FIDO key signature attest that the user was verified, 174850a69bb5SSascha Wildnere.g. via a PIN. 174950a69bb5SSascha Wildner.Pp 175050a69bb5SSascha WildnerNeither the 175150a69bb5SSascha Wildner.Cm touch-required 175250a69bb5SSascha Wildneror 175350a69bb5SSascha Wildner.Cm verify-required 175450a69bb5SSascha Wildneroptions have any effect for other, non-FIDO, public key types. 175518de8d7fSPeter Avalos.It Cm PubkeyAuthentication 175618de8d7fSPeter AvalosSpecifies whether public key authentication is allowed. 175718de8d7fSPeter AvalosThe default is 1758ce74bacaSMatthew Dillon.Cm yes . 175936e94dc5SPeter Avalos.It Cm RekeyLimit 1760ee116499SAntonio Huete JimenezSpecifies the maximum amount of data that may be transmitted or received 1761ee116499SAntonio Huete Jimenezbefore the session key is renegotiated, optionally followed by a maximum 1762ee116499SAntonio Huete Jimenezamount of time that may pass before the session key is renegotiated. 176336e94dc5SPeter AvalosThe first argument is specified in bytes and may have a suffix of 176436e94dc5SPeter Avalos.Sq K , 176536e94dc5SPeter Avalos.Sq M , 176636e94dc5SPeter Avalosor 176736e94dc5SPeter Avalos.Sq G 176836e94dc5SPeter Avalosto indicate Kilobytes, Megabytes, or Gigabytes, respectively. 176936e94dc5SPeter AvalosThe default is between 177036e94dc5SPeter Avalos.Sq 1G 177136e94dc5SPeter Avalosand 177236e94dc5SPeter Avalos.Sq 4G , 177336e94dc5SPeter Avalosdepending on the cipher. 177436e94dc5SPeter AvalosThe optional second value is specified in seconds and may use any of the 177536e94dc5SPeter Avalosunits documented in the 177636e94dc5SPeter Avalos.Sx TIME FORMATS 177736e94dc5SPeter Avalossection. 177836e94dc5SPeter AvalosThe default value for 177936e94dc5SPeter Avalos.Cm RekeyLimit 178036e94dc5SPeter Avalosis 1781ce74bacaSMatthew Dillon.Cm default none , 178236e94dc5SPeter Avaloswhich means that rekeying is performed after the cipher's default amount 178336e94dc5SPeter Avalosof data has been sent or received and no time based rekeying is done. 1784ee116499SAntonio Huete Jimenez.It Cm RequiredRSASize 1785ee116499SAntonio Huete JimenezSpecifies the minimum RSA key size (in bits) that 1786ee116499SAntonio Huete Jimenez.Xr sshd 8 1787ee116499SAntonio Huete Jimenezwill accept. 1788ee116499SAntonio Huete JimenezUser and host-based authentication keys smaller than this limit will be 1789ee116499SAntonio Huete Jimenezrefused. 1790ee116499SAntonio Huete JimenezThe default is 1791ee116499SAntonio Huete Jimenez.Cm 1024 1792ee116499SAntonio Huete Jimenezbits. 1793ee116499SAntonio Huete JimenezNote that this limit may only be raised from the default. 1794856ea928SPeter Avalos.It Cm RevokedKeys 1795e9778795SPeter AvalosSpecifies revoked public keys file, or 1796ce74bacaSMatthew Dillon.Cm none 1797e9778795SPeter Avalosto not use one. 1798856ea928SPeter AvalosKeys listed in this file will be refused for public key authentication. 1799856ea928SPeter AvalosNote that if this file is not readable, then public key authentication will 1800856ea928SPeter Avalosbe refused for all users. 180136e94dc5SPeter AvalosKeys may be specified as a text file, listing one public key per line, or as 180236e94dc5SPeter Avalosan OpenSSH Key Revocation List (KRL) as generated by 180336e94dc5SPeter Avalos.Xr ssh-keygen 1 . 180436e94dc5SPeter AvalosFor more information on KRLs, see the KEY REVOCATION LISTS section in 180536e94dc5SPeter Avalos.Xr ssh-keygen 1 . 1806664f4763Szrj.It Cm RDomain 1807664f4763SzrjSpecifies an explicit routing domain that is applied after authentication 1808664f4763Szrjhas completed. 180950a69bb5SSascha WildnerThe user session, as well as any forwarded or listening IP sockets, 1810664f4763Szrjwill be bound to this 1811664f4763Szrj.Xr rdomain 4 . 1812664f4763SzrjIf the routing domain is set to 1813664f4763Szrj.Cm \&%D , 1814664f4763Szrjthen the domain in which the incoming connection was received will be applied. 18150cbfa66cSDaniel Fojt.It Cm SecurityKeyProvider 18160cbfa66cSDaniel FojtSpecifies a path to a library that will be used when loading 18170cbfa66cSDaniel FojtFIDO authenticator-hosted keys, overriding the default of using 18180cbfa66cSDaniel Fojtthe built-in USB HID support. 1819664f4763Szrj.It Cm SetEnv 1820664f4763SzrjSpecifies one or more environment variables to set in child sessions started 1821664f4763Szrjby 1822664f4763Szrj.Xr sshd 8 1823664f4763Szrjas 1824664f4763Szrj.Dq NAME=VALUE . 1825664f4763SzrjThe environment value may be quoted (e.g. if it contains whitespace 1826664f4763Szrjcharacters). 1827664f4763SzrjEnvironment variables set by 1828664f4763Szrj.Cm SetEnv 1829664f4763Szrjoverride the default environment and any variables specified by the user 1830664f4763Szrjvia 1831664f4763Szrj.Cm AcceptEnv 1832664f4763Szrjor 1833664f4763Szrj.Cm PermitUserEnvironment . 1834*ba1276acSMatthew Dillon.It Cm SshdSessionPath 1835*ba1276acSMatthew DillonOverrides the default path to the 1836*ba1276acSMatthew Dillon.Cm sshd-session 1837*ba1276acSMatthew Dillonbinary that is invoked to handle each connection. 1838*ba1276acSMatthew DillonThe default is 1839*ba1276acSMatthew Dillon.Pa /usr/libexec/sshd-session . 1840*ba1276acSMatthew DillonThis option is intended for use by tests. 184136e94dc5SPeter Avalos.It Cm StreamLocalBindMask 184236e94dc5SPeter AvalosSets the octal file creation mode mask 184336e94dc5SPeter Avalos.Pq umask 184436e94dc5SPeter Avalosused when creating a Unix-domain socket file for local or remote 184536e94dc5SPeter Avalosport forwarding. 184636e94dc5SPeter AvalosThis option is only used for port forwarding to a Unix-domain socket file. 184736e94dc5SPeter Avalos.Pp 184836e94dc5SPeter AvalosThe default value is 0177, which creates a Unix-domain socket file that is 184936e94dc5SPeter Avalosreadable and writable only by the owner. 185036e94dc5SPeter AvalosNote that not all operating systems honor the file mode on Unix-domain 185136e94dc5SPeter Avalossocket files. 185236e94dc5SPeter Avalos.It Cm StreamLocalBindUnlink 185336e94dc5SPeter AvalosSpecifies whether to remove an existing Unix-domain socket file for local 185436e94dc5SPeter Avalosor remote port forwarding before creating a new one. 185536e94dc5SPeter AvalosIf the socket file already exists and 185636e94dc5SPeter Avalos.Cm StreamLocalBindUnlink 185736e94dc5SPeter Avalosis not enabled, 185836e94dc5SPeter Avalos.Nm sshd 185936e94dc5SPeter Avaloswill be unable to forward the port to the Unix-domain socket file. 186036e94dc5SPeter AvalosThis option is only used for port forwarding to a Unix-domain socket file. 186136e94dc5SPeter Avalos.Pp 186236e94dc5SPeter AvalosThe argument must be 1863ce74bacaSMatthew Dillon.Cm yes 186436e94dc5SPeter Avalosor 1865ce74bacaSMatthew Dillon.Cm no . 186636e94dc5SPeter AvalosThe default is 1867ce74bacaSMatthew Dillon.Cm no . 186818de8d7fSPeter Avalos.It Cm StrictModes 186918de8d7fSPeter AvalosSpecifies whether 187018de8d7fSPeter Avalos.Xr sshd 8 187118de8d7fSPeter Avalosshould check file modes and ownership of the 187218de8d7fSPeter Avalosuser's files and home directory before accepting login. 187318de8d7fSPeter AvalosThis is normally desirable because novices sometimes accidentally leave their 187418de8d7fSPeter Avalosdirectory or files world-writable. 187518de8d7fSPeter AvalosThe default is 1876ce74bacaSMatthew Dillon.Cm yes . 1877856ea928SPeter AvalosNote that this does not apply to 1878856ea928SPeter Avalos.Cm ChrootDirectory , 1879856ea928SPeter Avaloswhose permissions and ownership are checked unconditionally. 188018de8d7fSPeter Avalos.It Cm Subsystem 188118de8d7fSPeter AvalosConfigures an external subsystem (e.g. file transfer daemon). 188218de8d7fSPeter AvalosArguments should be a subsystem name and a command (with optional arguments) 188318de8d7fSPeter Avalosto execute upon subsystem request. 188418de8d7fSPeter Avalos.Pp 188518de8d7fSPeter AvalosThe command 1886ce74bacaSMatthew Dillon.Cm sftp-server 1887ce74bacaSMatthew Dillonimplements the SFTP file transfer subsystem. 188818de8d7fSPeter Avalos.Pp 188918de8d7fSPeter AvalosAlternately the name 1890ce74bacaSMatthew Dillon.Cm internal-sftp 1891ce74bacaSMatthew Dillonimplements an in-process SFTP server. 189218de8d7fSPeter AvalosThis may simplify configurations using 189318de8d7fSPeter Avalos.Cm ChrootDirectory 189418de8d7fSPeter Avalosto force a different filesystem root on clients. 1895*ba1276acSMatthew DillonIt accepts the same command line arguments as 1896*ba1276acSMatthew Dillon.Cm sftp-server 1897*ba1276acSMatthew Dillonand even though it is in-process, settings such as 1898*ba1276acSMatthew Dillon.Cm LogLevel 1899*ba1276acSMatthew Dillonor 1900*ba1276acSMatthew Dillon.Cm SyslogFacility 1901*ba1276acSMatthew Dillondo not apply to it and must be set explicitly via 1902*ba1276acSMatthew Dilloncommand line arguments. 190318de8d7fSPeter Avalos.Pp 190418de8d7fSPeter AvalosBy default no subsystems are defined. 190518de8d7fSPeter Avalos.It Cm SyslogFacility 190618de8d7fSPeter AvalosGives the facility code that is used when logging messages from 190718de8d7fSPeter Avalos.Xr sshd 8 . 190818de8d7fSPeter AvalosThe possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 190918de8d7fSPeter AvalosLOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 191018de8d7fSPeter AvalosThe default is AUTH. 191118de8d7fSPeter Avalos.It Cm TCPKeepAlive 191218de8d7fSPeter AvalosSpecifies whether the system should send TCP keepalive messages to the 191318de8d7fSPeter Avalosother side. 191418de8d7fSPeter AvalosIf they are sent, death of the connection or crash of one 191518de8d7fSPeter Avalosof the machines will be properly noticed. 191618de8d7fSPeter AvalosHowever, this means that 191718de8d7fSPeter Avalosconnections will die if the route is down temporarily, and some people 191818de8d7fSPeter Avalosfind it annoying. 191918de8d7fSPeter AvalosOn the other hand, if TCP keepalives are not sent, 192018de8d7fSPeter Avalossessions may hang indefinitely on the server, leaving 1921ce74bacaSMatthew Dillon.Qq ghost 192218de8d7fSPeter Avalosusers and consuming server resources. 192318de8d7fSPeter Avalos.Pp 192418de8d7fSPeter AvalosThe default is 1925ce74bacaSMatthew Dillon.Cm yes 192618de8d7fSPeter Avalos(to send TCP keepalive messages), and the server will notice 192718de8d7fSPeter Avalosif the network goes down or the client host crashes. 192818de8d7fSPeter AvalosThis avoids infinitely hanging sessions. 192918de8d7fSPeter Avalos.Pp 193018de8d7fSPeter AvalosTo disable TCP keepalive messages, the value should be set to 1931ce74bacaSMatthew Dillon.Cm no . 1932856ea928SPeter Avalos.It Cm TrustedUserCAKeys 1933856ea928SPeter AvalosSpecifies a file containing public keys of certificate authorities that are 1934e9778795SPeter Avalostrusted to sign user certificates for authentication, or 1935ce74bacaSMatthew Dillon.Cm none 1936e9778795SPeter Avalosto not use one. 1937856ea928SPeter AvalosKeys are listed one per line; empty lines and comments starting with 1938856ea928SPeter Avalos.Ql # 1939856ea928SPeter Avalosare allowed. 1940856ea928SPeter AvalosIf a certificate is presented for authentication and has its signing CA key 1941856ea928SPeter Avaloslisted in this file, then it may be used for authentication for any user 1942856ea928SPeter Avaloslisted in the certificate's principals list. 1943856ea928SPeter AvalosNote that certificates that lack a list of principals will not be permitted 1944856ea928SPeter Avalosfor authentication using 1945856ea928SPeter Avalos.Cm TrustedUserCAKeys . 194636e94dc5SPeter AvalosFor more details on certificates, see the CERTIFICATES section in 1947856ea928SPeter Avalos.Xr ssh-keygen 1 . 1948*ba1276acSMatthew Dillon.It Cm UnusedConnectionTimeout 1949*ba1276acSMatthew DillonSpecifies whether and how quickly 1950*ba1276acSMatthew Dillon.Xr sshd 8 1951*ba1276acSMatthew Dillonshould close client connections with no open channels. 1952*ba1276acSMatthew DillonOpen channels include active shell, command execution or subsystem 1953*ba1276acSMatthew Dillonsessions, connected network, socket, agent or X11 forwardings. 1954*ba1276acSMatthew DillonForwarding listeners, such as those from the 1955*ba1276acSMatthew Dillon.Xr ssh 1 1956*ba1276acSMatthew Dillon.Fl R 1957*ba1276acSMatthew Dillonflag, are not considered as open channels and do not prevent the timeout. 1958*ba1276acSMatthew DillonThe timeout value 1959*ba1276acSMatthew Dillonis specified in seconds or may use any of the units documented in the 1960*ba1276acSMatthew Dillon.Sx TIME FORMATS 1961*ba1276acSMatthew Dillonsection. 1962*ba1276acSMatthew Dillon.Pp 1963*ba1276acSMatthew DillonNote that this timeout starts when the client connection completes 1964*ba1276acSMatthew Dillonuser authentication but before the client has an opportunity to open any 1965*ba1276acSMatthew Dillonchannels. 1966*ba1276acSMatthew DillonCaution should be used when using short timeout values, as they may not 1967*ba1276acSMatthew Dillonprovide sufficient time for the client to request and open its channels 1968*ba1276acSMatthew Dillonbefore terminating the connection. 1969*ba1276acSMatthew Dillon.Pp 1970*ba1276acSMatthew DillonThe default 1971*ba1276acSMatthew Dillon.Cm none 1972*ba1276acSMatthew Dillonis to never expire connections for having no open channels. 1973*ba1276acSMatthew DillonThis option may be useful in conjunction with 1974*ba1276acSMatthew Dillon.Cm ChannelTimeout . 197518de8d7fSPeter Avalos.It Cm UseDNS 197618de8d7fSPeter AvalosSpecifies whether 197718de8d7fSPeter Avalos.Xr sshd 8 1978e9778795SPeter Avalosshould look up the remote host name, and to check that 197918de8d7fSPeter Avalosthe resolved host name for the remote IP address maps back to the 198018de8d7fSPeter Avalosvery same IP address. 1981e9778795SPeter Avalos.Pp 1982e9778795SPeter AvalosIf this option is set to 1983ce74bacaSMatthew Dillon.Cm no 1984e9778795SPeter Avalos(the default) then only addresses and not host names may be used in 1985e9778795SPeter Avalos.Pa ~/.ssh/authorized_keys 1986e9778795SPeter Avalos.Cm from 1987e9778795SPeter Avalosand 1988e9778795SPeter Avalos.Nm 1989e9778795SPeter Avalos.Cm Match 1990e9778795SPeter Avalos.Cm Host 1991e9778795SPeter Avalosdirectives. 199218de8d7fSPeter Avalos.It Cm UsePAM 199318de8d7fSPeter AvalosEnables the Pluggable Authentication Module interface. 199418de8d7fSPeter AvalosIf set to 1995ce74bacaSMatthew Dillon.Cm yes 199618de8d7fSPeter Avalosthis will enable PAM authentication using 199750a69bb5SSascha Wildner.Cm KbdInteractiveAuthentication 199818de8d7fSPeter Avalosand 199918de8d7fSPeter Avalos.Cm PasswordAuthentication 200018de8d7fSPeter Avalosin addition to PAM account and session module processing for all 200118de8d7fSPeter Avalosauthentication types. 200218de8d7fSPeter Avalos.Pp 200350a69bb5SSascha WildnerBecause PAM keyboard-interactive authentication usually serves an equivalent 200418de8d7fSPeter Avalosrole to password authentication, you should disable either 200518de8d7fSPeter Avalos.Cm PasswordAuthentication 200618de8d7fSPeter Avalosor 200750a69bb5SSascha Wildner.Cm KbdInteractiveAuthentication . 200818de8d7fSPeter Avalos.Pp 200918de8d7fSPeter AvalosIf 201018de8d7fSPeter Avalos.Cm UsePAM 201118de8d7fSPeter Avalosis enabled, you will not be able to run 201218de8d7fSPeter Avalos.Xr sshd 8 201318de8d7fSPeter Avalosas a non-root user. 201418de8d7fSPeter AvalosThe default is 2015ce74bacaSMatthew Dillon.Cm no . 201699e85e0dSPeter Avalos.It Cm VersionAddendum 201799e85e0dSPeter AvalosOptionally specifies additional text to append to the SSH protocol banner 201899e85e0dSPeter Avalossent by the server upon connection. 201999e85e0dSPeter AvalosThe default is 2020ce74bacaSMatthew Dillon.Cm none . 202118de8d7fSPeter Avalos.It Cm X11DisplayOffset 202218de8d7fSPeter AvalosSpecifies the first display number available for 202318de8d7fSPeter Avalos.Xr sshd 8 Ns 's 202418de8d7fSPeter AvalosX11 forwarding. 202518de8d7fSPeter AvalosThis prevents sshd from interfering with real X11 servers. 202618de8d7fSPeter AvalosThe default is 10. 202718de8d7fSPeter Avalos.It Cm X11Forwarding 202818de8d7fSPeter AvalosSpecifies whether X11 forwarding is permitted. 202918de8d7fSPeter AvalosThe argument must be 2030ce74bacaSMatthew Dillon.Cm yes 203118de8d7fSPeter Avalosor 2032ce74bacaSMatthew Dillon.Cm no . 203318de8d7fSPeter AvalosThe default is 2034ce74bacaSMatthew Dillon.Cm no . 203518de8d7fSPeter Avalos.Pp 203618de8d7fSPeter AvalosWhen X11 forwarding is enabled, there may be additional exposure to 203718de8d7fSPeter Avalosthe server and to client displays if the 203818de8d7fSPeter Avalos.Xr sshd 8 203918de8d7fSPeter Avalosproxy display is configured to listen on the wildcard address (see 2040ce74bacaSMatthew Dillon.Cm X11UseLocalhost ) , 2041ce74bacaSMatthew Dillonthough this is not the default. 204218de8d7fSPeter AvalosAdditionally, the authentication spoofing and authentication data 204318de8d7fSPeter Avalosverification and substitution occur on the client side. 204418de8d7fSPeter AvalosThe security risk of using X11 forwarding is that the client's X11 204518de8d7fSPeter Avalosdisplay server may be exposed to attack when the SSH client requests 204618de8d7fSPeter Avalosforwarding (see the warnings for 204718de8d7fSPeter Avalos.Cm ForwardX11 204818de8d7fSPeter Avalosin 204918de8d7fSPeter Avalos.Xr ssh_config 5 ) . 205018de8d7fSPeter AvalosA system administrator may have a stance in which they want to 205118de8d7fSPeter Avalosprotect clients that may expose themselves to attack by unwittingly 205218de8d7fSPeter Avalosrequesting X11 forwarding, which can warrant a 2053ce74bacaSMatthew Dillon.Cm no 205418de8d7fSPeter Avalossetting. 205518de8d7fSPeter Avalos.Pp 205618de8d7fSPeter AvalosNote that disabling X11 forwarding does not prevent users from 205718de8d7fSPeter Avalosforwarding X11 traffic, as users can always install their own forwarders. 205818de8d7fSPeter Avalos.It Cm X11UseLocalhost 205918de8d7fSPeter AvalosSpecifies whether 206018de8d7fSPeter Avalos.Xr sshd 8 206118de8d7fSPeter Avalosshould bind the X11 forwarding server to the loopback address or to 206218de8d7fSPeter Avalosthe wildcard address. 206318de8d7fSPeter AvalosBy default, 206418de8d7fSPeter Avalossshd binds the forwarding server to the loopback address and sets the 206518de8d7fSPeter Avaloshostname part of the 206618de8d7fSPeter Avalos.Ev DISPLAY 206718de8d7fSPeter Avalosenvironment variable to 2068ce74bacaSMatthew Dillon.Cm localhost . 206918de8d7fSPeter AvalosThis prevents remote hosts from connecting to the proxy display. 207018de8d7fSPeter AvalosHowever, some older X11 clients may not function with this 207118de8d7fSPeter Avalosconfiguration. 207218de8d7fSPeter Avalos.Cm X11UseLocalhost 207318de8d7fSPeter Avalosmay be set to 2074ce74bacaSMatthew Dillon.Cm no 207518de8d7fSPeter Avalosto specify that the forwarding server should be bound to the wildcard 207618de8d7fSPeter Avalosaddress. 207718de8d7fSPeter AvalosThe argument must be 2078ce74bacaSMatthew Dillon.Cm yes 207918de8d7fSPeter Avalosor 2080ce74bacaSMatthew Dillon.Cm no . 208118de8d7fSPeter AvalosThe default is 2082ce74bacaSMatthew Dillon.Cm yes . 208318de8d7fSPeter Avalos.It Cm XAuthLocation 208418de8d7fSPeter AvalosSpecifies the full pathname of the 208518de8d7fSPeter Avalos.Xr xauth 1 2086e9778795SPeter Avalosprogram, or 2087ce74bacaSMatthew Dillon.Cm none 2088e9778795SPeter Avalosto not use one. 208918de8d7fSPeter AvalosThe default is 209018de8d7fSPeter Avalos.Pa /usr/X11R6/bin/xauth . 209118de8d7fSPeter Avalos.El 209218de8d7fSPeter Avalos.Sh TIME FORMATS 209318de8d7fSPeter Avalos.Xr sshd 8 209418de8d7fSPeter Avaloscommand-line arguments and configuration file options that specify time 209518de8d7fSPeter Avalosmay be expressed using a sequence of the form: 209618de8d7fSPeter Avalos.Sm off 209718de8d7fSPeter Avalos.Ar time Op Ar qualifier , 209818de8d7fSPeter Avalos.Sm on 209918de8d7fSPeter Avaloswhere 210018de8d7fSPeter Avalos.Ar time 210118de8d7fSPeter Avalosis a positive integer value and 210218de8d7fSPeter Avalos.Ar qualifier 210318de8d7fSPeter Avalosis one of the following: 210418de8d7fSPeter Avalos.Pp 210518de8d7fSPeter Avalos.Bl -tag -width Ds -compact -offset indent 210618de8d7fSPeter Avalos.It Aq Cm none 210718de8d7fSPeter Avalosseconds 210818de8d7fSPeter Avalos.It Cm s | Cm S 210918de8d7fSPeter Avalosseconds 211018de8d7fSPeter Avalos.It Cm m | Cm M 211118de8d7fSPeter Avalosminutes 211218de8d7fSPeter Avalos.It Cm h | Cm H 211318de8d7fSPeter Avaloshours 211418de8d7fSPeter Avalos.It Cm d | Cm D 211518de8d7fSPeter Avalosdays 211618de8d7fSPeter Avalos.It Cm w | Cm W 211718de8d7fSPeter Avalosweeks 211818de8d7fSPeter Avalos.El 211918de8d7fSPeter Avalos.Pp 212018de8d7fSPeter AvalosEach member of the sequence is added together to calculate 212118de8d7fSPeter Avalosthe total time value. 212218de8d7fSPeter Avalos.Pp 212318de8d7fSPeter AvalosTime format examples: 212418de8d7fSPeter Avalos.Pp 212518de8d7fSPeter Avalos.Bl -tag -width Ds -compact -offset indent 212618de8d7fSPeter Avalos.It 600 212718de8d7fSPeter Avalos600 seconds (10 minutes) 212818de8d7fSPeter Avalos.It 10m 212918de8d7fSPeter Avalos10 minutes 213018de8d7fSPeter Avalos.It 1h30m 213118de8d7fSPeter Avalos1 hour 30 minutes (90 minutes) 213218de8d7fSPeter Avalos.El 2133ce74bacaSMatthew Dillon.Sh TOKENS 2134ce74bacaSMatthew DillonArguments to some keywords can make use of tokens, 2135ce74bacaSMatthew Dillonwhich are expanded at runtime: 2136ce74bacaSMatthew Dillon.Pp 2137ce74bacaSMatthew Dillon.Bl -tag -width XXXX -offset indent -compact 2138ce74bacaSMatthew Dillon.It %% 2139ce74bacaSMatthew DillonA literal 2140ce74bacaSMatthew Dillon.Sq % . 2141*ba1276acSMatthew Dillon.It \&%C 2142*ba1276acSMatthew DillonIdentifies the connection endpoints, containing 2143*ba1276acSMatthew Dillonfour space-separated values: client address, client port number, 2144*ba1276acSMatthew Dillonserver address, and server port number. 2145664f4763Szrj.It \&%D 2146664f4763SzrjThe routing domain in which the incoming connection was received. 2147ce74bacaSMatthew Dillon.It %F 2148ce74bacaSMatthew DillonThe fingerprint of the CA key. 2149ce74bacaSMatthew Dillon.It %f 2150ce74bacaSMatthew DillonThe fingerprint of the key or certificate. 2151ce74bacaSMatthew Dillon.It %h 2152ce74bacaSMatthew DillonThe home directory of the user. 2153ce74bacaSMatthew Dillon.It %i 2154ce74bacaSMatthew DillonThe key ID in the certificate. 2155ce74bacaSMatthew Dillon.It %K 2156ce74bacaSMatthew DillonThe base64-encoded CA key. 2157ce74bacaSMatthew Dillon.It %k 2158ce74bacaSMatthew DillonThe base64-encoded key or certificate for authentication. 2159ce74bacaSMatthew Dillon.It %s 2160ce74bacaSMatthew DillonThe serial number of the certificate. 2161ce74bacaSMatthew Dillon.It \&%T 2162ce74bacaSMatthew DillonThe type of the CA key. 2163ce74bacaSMatthew Dillon.It %t 2164ce74bacaSMatthew DillonThe key or certificate type. 2165664f4763Szrj.It \&%U 2166664f4763SzrjThe numeric user ID of the target user. 2167ce74bacaSMatthew Dillon.It %u 2168ce74bacaSMatthew DillonThe username. 2169ce74bacaSMatthew Dillon.El 2170ce74bacaSMatthew Dillon.Pp 2171ce74bacaSMatthew Dillon.Cm AuthorizedKeysCommand 2172*ba1276acSMatthew Dillonaccepts the tokens %%, %C, %D, %f, %h, %k, %t, %U, and %u. 2173ce74bacaSMatthew Dillon.Pp 2174ce74bacaSMatthew Dillon.Cm AuthorizedKeysFile 2175664f4763Szrjaccepts the tokens %%, %h, %U, and %u. 2176ce74bacaSMatthew Dillon.Pp 2177ce74bacaSMatthew Dillon.Cm AuthorizedPrincipalsCommand 2178*ba1276acSMatthew Dillonaccepts the tokens %%, %C, %D, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u. 2179ce74bacaSMatthew Dillon.Pp 2180ce74bacaSMatthew Dillon.Cm AuthorizedPrincipalsFile 2181664f4763Szrjaccepts the tokens %%, %h, %U, and %u. 2182ce74bacaSMatthew Dillon.Pp 2183ce74bacaSMatthew Dillon.Cm ChrootDirectory 2184664f4763Szrjaccepts the tokens %%, %h, %U, and %u. 2185664f4763Szrj.Pp 2186664f4763Szrj.Cm RoutingDomain 2187664f4763Szrjaccepts the token %D. 218818de8d7fSPeter Avalos.Sh FILES 218918de8d7fSPeter Avalos.Bl -tag -width Ds 219018de8d7fSPeter Avalos.It Pa /etc/ssh/sshd_config 219118de8d7fSPeter AvalosContains configuration data for 219218de8d7fSPeter Avalos.Xr sshd 8 . 219318de8d7fSPeter AvalosThis file should be writable by root only, but it is recommended 219418de8d7fSPeter Avalos(though not necessary) that it be world-readable. 219518de8d7fSPeter Avalos.El 219618de8d7fSPeter Avalos.Sh SEE ALSO 2197ce74bacaSMatthew Dillon.Xr sftp-server 8 , 219818de8d7fSPeter Avalos.Xr sshd 8 219918de8d7fSPeter Avalos.Sh AUTHORS 2200ce74bacaSMatthew Dillon.An -nosplit 220118de8d7fSPeter AvalosOpenSSH is a derivative of the original and free 2202ce74bacaSMatthew Dillonssh 1.2.12 release by 2203ce74bacaSMatthew Dillon.An Tatu Ylonen . 2204ce74bacaSMatthew Dillon.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , 2205ce74bacaSMatthew Dillon.An Theo de Raadt 2206ce74bacaSMatthew Dillonand 2207ce74bacaSMatthew Dillon.An Dug Song 220818de8d7fSPeter Avalosremoved many bugs, re-added newer features and 220918de8d7fSPeter Avaloscreated OpenSSH. 2210ce74bacaSMatthew Dillon.An Markus Friedl 2211ce74bacaSMatthew Dilloncontributed the support for SSH protocol versions 1.5 and 2.0. 2212ce74bacaSMatthew Dillon.An Niels Provos 2213ce74bacaSMatthew Dillonand 2214ce74bacaSMatthew Dillon.An Markus Friedl 2215ce74bacaSMatthew Dilloncontributed support for privilege separation. 2216