1545d5ecaSDag-Erling Smørgrav.\" 2545d5ecaSDag-Erling Smørgrav.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4545d5ecaSDag-Erling Smørgrav.\" All rights reserved 5545d5ecaSDag-Erling Smørgrav.\" 6545d5ecaSDag-Erling Smørgrav.\" As far as I am concerned, the code I have written for this software 7545d5ecaSDag-Erling Smørgrav.\" can be used freely for any purpose. Any derived versions of this 8545d5ecaSDag-Erling Smørgrav.\" software must be clearly marked as such, and if the derived work is 9545d5ecaSDag-Erling Smørgrav.\" incompatible with the protocol description in the RFC file, it must be 10545d5ecaSDag-Erling Smørgrav.\" called by a name other than "ssh" or "Secure Shell". 11545d5ecaSDag-Erling Smørgrav.\" 12545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. 13545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1999 Aaron Campbell. All rights reserved. 14545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1999 Theo de Raadt. All rights reserved. 15545d5ecaSDag-Erling Smørgrav.\" 16545d5ecaSDag-Erling Smørgrav.\" Redistribution and use in source and binary forms, with or without 17545d5ecaSDag-Erling Smørgrav.\" modification, are permitted provided that the following conditions 18545d5ecaSDag-Erling Smørgrav.\" are met: 19545d5ecaSDag-Erling Smørgrav.\" 1. Redistributions of source code must retain the above copyright 20545d5ecaSDag-Erling Smørgrav.\" notice, this list of conditions and the following disclaimer. 21545d5ecaSDag-Erling Smørgrav.\" 2. Redistributions in binary form must reproduce the above copyright 22545d5ecaSDag-Erling Smørgrav.\" notice, this list of conditions and the following disclaimer in the 23545d5ecaSDag-Erling Smørgrav.\" documentation and/or other materials provided with the distribution. 24545d5ecaSDag-Erling Smørgrav.\" 25545d5ecaSDag-Erling Smørgrav.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 26545d5ecaSDag-Erling Smørgrav.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 27545d5ecaSDag-Erling Smørgrav.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 28545d5ecaSDag-Erling Smørgrav.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 29545d5ecaSDag-Erling Smørgrav.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 30545d5ecaSDag-Erling Smørgrav.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31545d5ecaSDag-Erling Smørgrav.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32545d5ecaSDag-Erling Smørgrav.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33545d5ecaSDag-Erling Smørgrav.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34545d5ecaSDag-Erling Smørgrav.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35545d5ecaSDag-Erling Smørgrav.\" 36*bc5531deSDag-Erling Smørgrav.\" $OpenBSD: sshd_config.5,v 1.194 2015/02/20 23:46:01 djm Exp $ 3735d4ccfbSDag-Erling Smørgrav.\" $FreeBSD$ 38*bc5531deSDag-Erling Smørgrav.Dd $Mdocdate: February 20 2015 $ 39545d5ecaSDag-Erling Smørgrav.Dt SSHD_CONFIG 5 40545d5ecaSDag-Erling Smørgrav.Os 41545d5ecaSDag-Erling Smørgrav.Sh NAME 42545d5ecaSDag-Erling Smørgrav.Nm sshd_config 43545d5ecaSDag-Erling Smørgrav.Nd OpenSSH SSH daemon configuration file 44545d5ecaSDag-Erling Smørgrav.Sh SYNOPSIS 45d4af9e69SDag-Erling Smørgrav.Nm /etc/ssh/sshd_config 46545d5ecaSDag-Erling Smørgrav.Sh DESCRIPTION 47333ee039SDag-Erling Smørgrav.Xr sshd 8 48545d5ecaSDag-Erling Smørgravreads configuration data from 49545d5ecaSDag-Erling Smørgrav.Pa /etc/ssh/sshd_config 50545d5ecaSDag-Erling Smørgrav(or the file specified with 51545d5ecaSDag-Erling Smørgrav.Fl f 52545d5ecaSDag-Erling Smørgravon the command line). 53545d5ecaSDag-Erling SmørgravThe file contains keyword-argument pairs, one per line. 54545d5ecaSDag-Erling SmørgravLines starting with 55545d5ecaSDag-Erling Smørgrav.Ql # 56545d5ecaSDag-Erling Smørgravand empty lines are interpreted as comments. 57333ee039SDag-Erling SmørgravArguments may optionally be enclosed in double quotes 58333ee039SDag-Erling Smørgrav.Pq \&" 59333ee039SDag-Erling Smørgravin order to represent arguments containing spaces. 60545d5ecaSDag-Erling Smørgrav.Pp 61545d5ecaSDag-Erling SmørgravThe possible 62545d5ecaSDag-Erling Smørgravkeywords and their meanings are as follows (note that 63545d5ecaSDag-Erling Smørgravkeywords are case-insensitive and arguments are case-sensitive): 64545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds 6521e764dfSDag-Erling Smørgrav.It Cm AcceptEnv 6621e764dfSDag-Erling SmørgravSpecifies what environment variables sent by the client will be copied into 6721e764dfSDag-Erling Smørgravthe session's 6821e764dfSDag-Erling Smørgrav.Xr environ 7 . 6921e764dfSDag-Erling SmørgravSee 7021e764dfSDag-Erling Smørgrav.Cm SendEnv 7121e764dfSDag-Erling Smørgravin 7221e764dfSDag-Erling Smørgrav.Xr ssh_config 5 7321e764dfSDag-Erling Smørgravfor how to configure the client. 7421e764dfSDag-Erling SmørgravNote that environment passing is only supported for protocol 2. 7521e764dfSDag-Erling SmørgravVariables are specified by name, which may contain the wildcard characters 76333ee039SDag-Erling Smørgrav.Ql * 7721e764dfSDag-Erling Smørgravand 7821e764dfSDag-Erling Smørgrav.Ql \&? . 7921e764dfSDag-Erling SmørgravMultiple environment variables may be separated by whitespace or spread 8021e764dfSDag-Erling Smørgravacross multiple 8121e764dfSDag-Erling Smørgrav.Cm AcceptEnv 8221e764dfSDag-Erling Smørgravdirectives. 8321e764dfSDag-Erling SmørgravBe warned that some environment variables could be used to bypass restricted 8421e764dfSDag-Erling Smørgravuser environments. 8521e764dfSDag-Erling SmørgravFor this reason, care should be taken in the use of this directive. 8621e764dfSDag-Erling SmørgravThe default is not to accept any environment variables. 87aa49c926SDag-Erling Smørgrav.It Cm AddressFamily 88aa49c926SDag-Erling SmørgravSpecifies which address family should be used by 89333ee039SDag-Erling Smørgrav.Xr sshd 8 . 90aa49c926SDag-Erling SmørgravValid arguments are 91aa49c926SDag-Erling Smørgrav.Dq any , 92aa49c926SDag-Erling Smørgrav.Dq inet 93333ee039SDag-Erling Smørgrav(use IPv4 only), or 94aa49c926SDag-Erling Smørgrav.Dq inet6 95aa49c926SDag-Erling Smørgrav(use IPv6 only). 96aa49c926SDag-Erling SmørgravThe default is 97aa49c926SDag-Erling Smørgrav.Dq any . 98d4af9e69SDag-Erling Smørgrav.It Cm AllowAgentForwarding 99d4af9e69SDag-Erling SmørgravSpecifies whether 100d4af9e69SDag-Erling Smørgrav.Xr ssh-agent 1 101d4af9e69SDag-Erling Smørgravforwarding is permitted. 102d4af9e69SDag-Erling SmørgravThe default is 103d4af9e69SDag-Erling Smørgrav.Dq yes . 104d4af9e69SDag-Erling SmørgravNote that disabling agent forwarding does not improve security 105d4af9e69SDag-Erling Smørgravunless users are also denied shell access, as they can always install 106d4af9e69SDag-Erling Smørgravtheir own forwarders. 107545d5ecaSDag-Erling Smørgrav.It Cm AllowGroups 108545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of group name patterns, separated 109545d5ecaSDag-Erling Smørgravby spaces. 110545d5ecaSDag-Erling SmørgravIf specified, login is allowed only for users whose primary 111545d5ecaSDag-Erling Smørgravgroup or supplementary group list matches one of the patterns. 112545d5ecaSDag-Erling SmørgravOnly group names are valid; a numerical group ID is not recognized. 113545d5ecaSDag-Erling SmørgravBy default, login is allowed for all groups. 114333ee039SDag-Erling SmørgravThe allow/deny directives are processed in the following order: 115333ee039SDag-Erling Smørgrav.Cm DenyUsers , 116333ee039SDag-Erling Smørgrav.Cm AllowUsers , 117333ee039SDag-Erling Smørgrav.Cm DenyGroups , 118333ee039SDag-Erling Smørgravand finally 119333ee039SDag-Erling Smørgrav.Cm AllowGroups . 120333ee039SDag-Erling Smørgrav.Pp 121e4a9863fSDag-Erling SmørgravSee PATTERNS in 122333ee039SDag-Erling Smørgrav.Xr ssh_config 5 123333ee039SDag-Erling Smørgravfor more information on patterns. 124545d5ecaSDag-Erling Smørgrav.It Cm AllowTcpForwarding 125545d5ecaSDag-Erling SmørgravSpecifies whether TCP forwarding is permitted. 1266888a9beSDag-Erling SmørgravThe available options are 1276888a9beSDag-Erling Smørgrav.Dq yes 1286888a9beSDag-Erling Smørgravor 1296888a9beSDag-Erling Smørgrav.Dq all 1306888a9beSDag-Erling Smørgravto allow TCP forwarding, 1316888a9beSDag-Erling Smørgrav.Dq no 1326888a9beSDag-Erling Smørgravto prevent all TCP forwarding, 1336888a9beSDag-Erling Smørgrav.Dq local 1346888a9beSDag-Erling Smørgravto allow local (from the perspective of 1356888a9beSDag-Erling Smørgrav.Xr ssh 1 ) 1366888a9beSDag-Erling Smørgravforwarding only or 1376888a9beSDag-Erling Smørgrav.Dq remote 1386888a9beSDag-Erling Smørgravto allow remote forwarding only. 139545d5ecaSDag-Erling SmørgravThe default is 140545d5ecaSDag-Erling Smørgrav.Dq yes . 141545d5ecaSDag-Erling SmørgravNote that disabling TCP forwarding does not improve security unless 142545d5ecaSDag-Erling Smørgravusers are also denied shell access, as they can always install their 143545d5ecaSDag-Erling Smørgravown forwarders. 144a0ee8cc6SDag-Erling Smørgrav.It Cm AllowStreamLocalForwarding 145a0ee8cc6SDag-Erling SmørgravSpecifies whether StreamLocal (Unix-domain socket) forwarding is permitted. 146a0ee8cc6SDag-Erling SmørgravThe available options are 147a0ee8cc6SDag-Erling Smørgrav.Dq yes 148a0ee8cc6SDag-Erling Smørgravor 149a0ee8cc6SDag-Erling Smørgrav.Dq all 150a0ee8cc6SDag-Erling Smørgravto allow StreamLocal forwarding, 151a0ee8cc6SDag-Erling Smørgrav.Dq no 152a0ee8cc6SDag-Erling Smørgravto prevent all StreamLocal forwarding, 153a0ee8cc6SDag-Erling Smørgrav.Dq local 154a0ee8cc6SDag-Erling Smørgravto allow local (from the perspective of 155a0ee8cc6SDag-Erling Smørgrav.Xr ssh 1 ) 156a0ee8cc6SDag-Erling Smørgravforwarding only or 157a0ee8cc6SDag-Erling Smørgrav.Dq remote 158a0ee8cc6SDag-Erling Smørgravto allow remote forwarding only. 159a0ee8cc6SDag-Erling SmørgravThe default is 160a0ee8cc6SDag-Erling Smørgrav.Dq yes . 161a0ee8cc6SDag-Erling SmørgravNote that disabling StreamLocal forwarding does not improve security unless 162a0ee8cc6SDag-Erling Smørgravusers are also denied shell access, as they can always install their 163a0ee8cc6SDag-Erling Smørgravown forwarders. 164545d5ecaSDag-Erling Smørgrav.It Cm AllowUsers 165545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of user name patterns, separated 166545d5ecaSDag-Erling Smørgravby spaces. 167e73e9afaSDag-Erling SmørgravIf specified, login is allowed only for user names that 168545d5ecaSDag-Erling Smørgravmatch one of the patterns. 169545d5ecaSDag-Erling SmørgravOnly user names are valid; a numerical user ID is not recognized. 170545d5ecaSDag-Erling SmørgravBy default, login is allowed for all users. 171545d5ecaSDag-Erling SmørgravIf the pattern takes the form USER@HOST then USER and HOST 172545d5ecaSDag-Erling Smørgravare separately checked, restricting logins to particular 173545d5ecaSDag-Erling Smørgravusers from particular hosts. 174333ee039SDag-Erling SmørgravThe allow/deny directives are processed in the following order: 175333ee039SDag-Erling Smørgrav.Cm DenyUsers , 176333ee039SDag-Erling Smørgrav.Cm AllowUsers , 177333ee039SDag-Erling Smørgrav.Cm DenyGroups , 178333ee039SDag-Erling Smørgravand finally 179333ee039SDag-Erling Smørgrav.Cm AllowGroups . 180333ee039SDag-Erling Smørgrav.Pp 181e4a9863fSDag-Erling SmørgravSee PATTERNS in 182333ee039SDag-Erling Smørgrav.Xr ssh_config 5 183333ee039SDag-Erling Smørgravfor more information on patterns. 1846888a9beSDag-Erling Smørgrav.It Cm AuthenticationMethods 1856888a9beSDag-Erling SmørgravSpecifies the authentication methods that must be successfully completed 1866888a9beSDag-Erling Smørgravfor a user to be granted access. 1876888a9beSDag-Erling SmørgravThis option must be followed by one or more comma-separated lists of 1886888a9beSDag-Erling Smørgravauthentication method names. 1896888a9beSDag-Erling SmørgravSuccessful authentication requires completion of every method in at least 1906888a9beSDag-Erling Smørgravone of these lists. 1916888a9beSDag-Erling Smørgrav.Pp 1926888a9beSDag-Erling SmørgravFor example, an argument of 1936888a9beSDag-Erling Smørgrav.Dq publickey,password publickey,keyboard-interactive 1946888a9beSDag-Erling Smørgravwould require the user to complete public key authentication, followed by 1956888a9beSDag-Erling Smørgraveither password or keyboard interactive authentication. 1966888a9beSDag-Erling SmørgravOnly methods that are next in one or more lists are offered at each stage, 1976888a9beSDag-Erling Smørgravso for this example, it would not be possible to attempt password or 1986888a9beSDag-Erling Smørgravkeyboard-interactive authentication before public key. 1996888a9beSDag-Erling Smørgrav.Pp 200e4a9863fSDag-Erling SmørgravFor keyboard interactive authentication it is also possible to 201e4a9863fSDag-Erling Smørgravrestrict authentication to a specific device by appending a 202e4a9863fSDag-Erling Smørgravcolon followed by the device identifier 203e4a9863fSDag-Erling Smørgrav.Dq bsdauth , 204e4a9863fSDag-Erling Smørgrav.Dq pam , 205e4a9863fSDag-Erling Smørgravor 206e4a9863fSDag-Erling Smørgrav.Dq skey , 207e4a9863fSDag-Erling Smørgravdepending on the server configuration. 208e4a9863fSDag-Erling SmørgravFor example, 209e4a9863fSDag-Erling Smørgrav.Dq keyboard-interactive:bsdauth 210e4a9863fSDag-Erling Smørgravwould restrict keyboard interactive authentication to the 211e4a9863fSDag-Erling Smørgrav.Dq bsdauth 212e4a9863fSDag-Erling Smørgravdevice. 213e4a9863fSDag-Erling Smørgrav.Pp 214*bc5531deSDag-Erling SmørgravIf the 215*bc5531deSDag-Erling Smørgrav.Dq publickey 216*bc5531deSDag-Erling Smørgravmethod is listed more than once, 217*bc5531deSDag-Erling Smørgrav.Xr sshd 8 218*bc5531deSDag-Erling Smørgravverifies that keys that have been used successfully are not reused for 219*bc5531deSDag-Erling Smørgravsubsequent authentications. 220*bc5531deSDag-Erling SmørgravFor example, an 221*bc5531deSDag-Erling Smørgrav.Cm AuthenticationMethods 222*bc5531deSDag-Erling Smørgravof 223*bc5531deSDag-Erling Smørgrav.Dq publickey,publickey 224*bc5531deSDag-Erling Smørgravwill require successful authentication using two different public keys. 225*bc5531deSDag-Erling Smørgrav.Pp 2266888a9beSDag-Erling SmørgravThis option is only available for SSH protocol 2 and will yield a fatal 2276888a9beSDag-Erling Smørgraverror if enabled if protocol 1 is also enabled. 2286888a9beSDag-Erling SmørgravNote that each authentication method listed should also be explicitly enabled 2296888a9beSDag-Erling Smørgravin the configuration. 2306888a9beSDag-Erling SmørgravThe default is not to require multiple authentication; successful completion 2316888a9beSDag-Erling Smørgravof a single authentication method is sufficient. 2326888a9beSDag-Erling Smørgrav.It Cm AuthorizedKeysCommand 2336888a9beSDag-Erling SmørgravSpecifies a program to be used to look up the user's public keys. 234e4a9863fSDag-Erling SmørgravThe program must be owned by root and not writable by group or others. 235e4a9863fSDag-Erling SmørgravIt will be invoked with a single argument of the username 2366888a9beSDag-Erling Smørgravbeing authenticated, and should produce on standard output zero or 237e4a9863fSDag-Erling Smørgravmore lines of authorized_keys output (see AUTHORIZED_KEYS in 2386888a9beSDag-Erling Smørgrav.Xr sshd 8 ) . 2396888a9beSDag-Erling SmørgravIf a key supplied by AuthorizedKeysCommand does not successfully authenticate 2406888a9beSDag-Erling Smørgravand authorize the user then public key authentication continues using the usual 2416888a9beSDag-Erling Smørgrav.Cm AuthorizedKeysFile 2426888a9beSDag-Erling Smørgravfiles. 2436888a9beSDag-Erling SmørgravBy default, no AuthorizedKeysCommand is run. 2446888a9beSDag-Erling Smørgrav.It Cm AuthorizedKeysCommandUser 2456888a9beSDag-Erling SmørgravSpecifies the user under whose account the AuthorizedKeysCommand is run. 2466888a9beSDag-Erling SmørgravIt is recommended to use a dedicated user that has no other role on the host 2476888a9beSDag-Erling Smørgravthan running authorized keys commands. 248*bc5531deSDag-Erling SmørgravIf 249*bc5531deSDag-Erling Smørgrav.Cm AuthorizedKeysCommand 250*bc5531deSDag-Erling Smørgravis specified but 251*bc5531deSDag-Erling Smørgrav.Cm AuthorizedKeysCommandUser 252*bc5531deSDag-Erling Smørgravis not, then 253*bc5531deSDag-Erling Smørgrav.Xr sshd 8 254*bc5531deSDag-Erling Smørgravwill refuse to start. 255545d5ecaSDag-Erling Smørgrav.It Cm AuthorizedKeysFile 256545d5ecaSDag-Erling SmørgravSpecifies the file that contains the public keys that can be used 257545d5ecaSDag-Erling Smørgravfor user authentication. 258e2f6069cSDag-Erling SmørgravThe format is described in the 259e4a9863fSDag-Erling SmørgravAUTHORIZED_KEYS FILE FORMAT 260e2f6069cSDag-Erling Smørgravsection of 261e2f6069cSDag-Erling Smørgrav.Xr sshd 8 . 262545d5ecaSDag-Erling Smørgrav.Cm AuthorizedKeysFile 263545d5ecaSDag-Erling Smørgravmay contain tokens of the form %T which are substituted during connection 264333ee039SDag-Erling Smørgravsetup. 265cf2b5f3bSDag-Erling SmørgravThe following tokens are defined: %% is replaced by a literal '%', 266333ee039SDag-Erling Smørgrav%h is replaced by the home directory of the user being authenticated, and 267545d5ecaSDag-Erling Smørgrav%u is replaced by the username of that user. 268545d5ecaSDag-Erling SmørgravAfter expansion, 269545d5ecaSDag-Erling Smørgrav.Cm AuthorizedKeysFile 270545d5ecaSDag-Erling Smørgravis taken to be an absolute path or one relative to the user's home 271545d5ecaSDag-Erling Smørgravdirectory. 272e146993eSDag-Erling SmørgravMultiple files may be listed, separated by whitespace. 273545d5ecaSDag-Erling SmørgravThe default is 274e146993eSDag-Erling Smørgrav.Dq .ssh/authorized_keys .ssh/authorized_keys2 . 275e2f6069cSDag-Erling Smørgrav.It Cm AuthorizedPrincipalsFile 276e2f6069cSDag-Erling SmørgravSpecifies a file that lists principal names that are accepted for 277e2f6069cSDag-Erling Smørgravcertificate authentication. 278e2f6069cSDag-Erling SmørgravWhen using certificates signed by a key listed in 279e2f6069cSDag-Erling Smørgrav.Cm TrustedUserCAKeys , 280e2f6069cSDag-Erling Smørgravthis file lists names, one of which must appear in the certificate for it 281e2f6069cSDag-Erling Smørgravto be accepted for authentication. 282e2f6069cSDag-Erling SmørgravNames are listed one per line preceded by key options (as described 283e4a9863fSDag-Erling Smørgravin AUTHORIZED_KEYS FILE FORMAT in 284e2f6069cSDag-Erling Smørgrav.Xr sshd 8 ) . 285e2f6069cSDag-Erling SmørgravEmpty lines and comments starting with 286e2f6069cSDag-Erling Smørgrav.Ql # 287e2f6069cSDag-Erling Smørgravare ignored. 288e2f6069cSDag-Erling Smørgrav.Pp 289e2f6069cSDag-Erling Smørgrav.Cm AuthorizedPrincipalsFile 290e2f6069cSDag-Erling Smørgravmay contain tokens of the form %T which are substituted during connection 291e2f6069cSDag-Erling Smørgravsetup. 292e2f6069cSDag-Erling SmørgravThe following tokens are defined: %% is replaced by a literal '%', 293e2f6069cSDag-Erling Smørgrav%h is replaced by the home directory of the user being authenticated, and 294e2f6069cSDag-Erling Smørgrav%u is replaced by the username of that user. 295e2f6069cSDag-Erling SmørgravAfter expansion, 296e2f6069cSDag-Erling Smørgrav.Cm AuthorizedPrincipalsFile 297e2f6069cSDag-Erling Smørgravis taken to be an absolute path or one relative to the user's home 298e2f6069cSDag-Erling Smørgravdirectory. 299e2f6069cSDag-Erling Smørgrav.Pp 300462c32cbSDag-Erling SmørgravThe default is 301462c32cbSDag-Erling Smørgrav.Dq none , 302462c32cbSDag-Erling Smørgravi.e. not to use a principals file \(en in this case, the username 303e2f6069cSDag-Erling Smørgravof the user must appear in a certificate's principals list for it to be 304e2f6069cSDag-Erling Smørgravaccepted. 305e2f6069cSDag-Erling SmørgravNote that 306e2f6069cSDag-Erling Smørgrav.Cm AuthorizedPrincipalsFile 307e2f6069cSDag-Erling Smørgravis only used when authentication proceeds using a CA listed in 308e2f6069cSDag-Erling Smørgrav.Cm TrustedUserCAKeys 309e2f6069cSDag-Erling Smørgravand is not consulted for certification authorities trusted via 310e2f6069cSDag-Erling Smørgrav.Pa ~/.ssh/authorized_keys , 311e2f6069cSDag-Erling Smørgravthough the 312e2f6069cSDag-Erling Smørgrav.Cm principals= 313e2f6069cSDag-Erling Smørgravkey option offers a similar facility (see 314e2f6069cSDag-Erling Smørgrav.Xr sshd 8 315e2f6069cSDag-Erling Smørgravfor details). 316545d5ecaSDag-Erling Smørgrav.It Cm Banner 317545d5ecaSDag-Erling SmørgravThe contents of the specified file are sent to the remote user before 318545d5ecaSDag-Erling Smørgravauthentication is allowed. 319d4af9e69SDag-Erling SmørgravIf the argument is 320d4af9e69SDag-Erling Smørgrav.Dq none 321d4af9e69SDag-Erling Smørgravthen no banner is displayed. 322545d5ecaSDag-Erling SmørgravThis option is only available for protocol version 2. 323545d5ecaSDag-Erling SmørgravBy default, no banner is displayed. 324545d5ecaSDag-Erling Smørgrav.It Cm ChallengeResponseAuthentication 3257aee6ffeSDag-Erling SmørgravSpecifies whether challenge-response authentication is allowed (e.g. via 326a0ee8cc6SDag-Erling SmørgravPAM or through authentication styles supported in 3277aee6ffeSDag-Erling Smørgrav.Xr login.conf 5 ) 328545d5ecaSDag-Erling SmørgravThe default is 329545d5ecaSDag-Erling Smørgrav.Dq yes . 330d4af9e69SDag-Erling Smørgrav.It Cm ChrootDirectory 331b15c8340SDag-Erling SmørgravSpecifies the pathname of a directory to 332d4af9e69SDag-Erling Smørgrav.Xr chroot 2 333d4af9e69SDag-Erling Smørgravto after authentication. 334*bc5531deSDag-Erling SmørgravAt session startup 335*bc5531deSDag-Erling Smørgrav.Xr sshd 8 336*bc5531deSDag-Erling Smørgravchecks that all components of the pathname are root-owned directories 337*bc5531deSDag-Erling Smørgravwhich are not writable by any other user or group. 3387aee6ffeSDag-Erling SmørgravAfter the chroot, 3397aee6ffeSDag-Erling Smørgrav.Xr sshd 8 3407aee6ffeSDag-Erling Smørgravchanges the working directory to the user's home directory. 341d4af9e69SDag-Erling Smørgrav.Pp 342b15c8340SDag-Erling SmørgravThe pathname may contain the following tokens that are expanded at runtime once 343d4af9e69SDag-Erling Smørgravthe connecting user has been authenticated: %% is replaced by a literal '%', 344d4af9e69SDag-Erling Smørgrav%h is replaced by the home directory of the user being authenticated, and 345d4af9e69SDag-Erling Smørgrav%u is replaced by the username of that user. 346d4af9e69SDag-Erling Smørgrav.Pp 347d4af9e69SDag-Erling SmørgravThe 348d4af9e69SDag-Erling Smørgrav.Cm ChrootDirectory 349d4af9e69SDag-Erling Smørgravmust contain the necessary files and directories to support the 3507aee6ffeSDag-Erling Smørgravuser's session. 351d4af9e69SDag-Erling SmørgravFor an interactive session this requires at least a shell, typically 352d4af9e69SDag-Erling Smørgrav.Xr sh 1 , 353d4af9e69SDag-Erling Smørgravand basic 354d4af9e69SDag-Erling Smørgrav.Pa /dev 355d4af9e69SDag-Erling Smørgravnodes such as 356d4af9e69SDag-Erling Smørgrav.Xr null 4 , 357d4af9e69SDag-Erling Smørgrav.Xr zero 4 , 358d4af9e69SDag-Erling Smørgrav.Xr stdin 4 , 359d4af9e69SDag-Erling Smørgrav.Xr stdout 4 , 360d4af9e69SDag-Erling Smørgrav.Xr stderr 4 , 361d4af9e69SDag-Erling Smørgravand 362d4af9e69SDag-Erling Smørgrav.Xr tty 4 363d4af9e69SDag-Erling Smørgravdevices. 364d4af9e69SDag-Erling SmørgravFor file transfer sessions using 365d4af9e69SDag-Erling Smørgrav.Dq sftp , 366d4af9e69SDag-Erling Smørgravno additional configuration of the environment is necessary if the 3677aee6ffeSDag-Erling Smørgravin-process sftp server is used, 368a0ee8cc6SDag-Erling Smørgravthough sessions which use logging may require 3697aee6ffeSDag-Erling Smørgrav.Pa /dev/log 370a0ee8cc6SDag-Erling Smørgravinside the chroot directory on some operating systems (see 3717aee6ffeSDag-Erling Smørgrav.Xr sftp-server 8 372d4af9e69SDag-Erling Smørgravfor details). 373d4af9e69SDag-Erling Smørgrav.Pp 374*bc5531deSDag-Erling SmørgravFor safety, it is very important that the directory hierarchy be 375*bc5531deSDag-Erling Smørgravprevented from modification by other processes on the system (especially 376*bc5531deSDag-Erling Smørgravthose outside the jail). 377*bc5531deSDag-Erling SmørgravMisconfiguration can lead to unsafe environments which 378*bc5531deSDag-Erling Smørgrav.Xr sshd 8 379*bc5531deSDag-Erling Smørgravcannot detect. 380*bc5531deSDag-Erling Smørgrav.Pp 381d4af9e69SDag-Erling SmørgravThe default is not to 382d4af9e69SDag-Erling Smørgrav.Xr chroot 2 . 383545d5ecaSDag-Erling Smørgrav.It Cm Ciphers 384545d5ecaSDag-Erling SmørgravSpecifies the ciphers allowed for protocol version 2. 385545d5ecaSDag-Erling SmørgravMultiple ciphers must be comma-separated. 386f7167e0eSDag-Erling SmørgravThe supported ciphers are: 387f7167e0eSDag-Erling Smørgrav.Pp 388a0ee8cc6SDag-Erling Smørgrav.Bl -item -compact -offset indent 389a0ee8cc6SDag-Erling Smørgrav.It 390a0ee8cc6SDag-Erling Smørgrav3des-cbc 391a0ee8cc6SDag-Erling Smørgrav.It 392a0ee8cc6SDag-Erling Smørgravaes128-cbc 393a0ee8cc6SDag-Erling Smørgrav.It 394a0ee8cc6SDag-Erling Smørgravaes192-cbc 395a0ee8cc6SDag-Erling Smørgrav.It 396a0ee8cc6SDag-Erling Smørgravaes256-cbc 397a0ee8cc6SDag-Erling Smørgrav.It 398a0ee8cc6SDag-Erling Smørgravaes128-ctr 399a0ee8cc6SDag-Erling Smørgrav.It 400a0ee8cc6SDag-Erling Smørgravaes192-ctr 401a0ee8cc6SDag-Erling Smørgrav.It 402a0ee8cc6SDag-Erling Smørgravaes256-ctr 403a0ee8cc6SDag-Erling Smørgrav.It 404a0ee8cc6SDag-Erling Smørgravaes128-gcm@openssh.com 405a0ee8cc6SDag-Erling Smørgrav.It 406a0ee8cc6SDag-Erling Smørgravaes256-gcm@openssh.com 407a0ee8cc6SDag-Erling Smørgrav.It 408a0ee8cc6SDag-Erling Smørgravarcfour 409a0ee8cc6SDag-Erling Smørgrav.It 410a0ee8cc6SDag-Erling Smørgravarcfour128 411a0ee8cc6SDag-Erling Smørgrav.It 412a0ee8cc6SDag-Erling Smørgravarcfour256 413a0ee8cc6SDag-Erling Smørgrav.It 414a0ee8cc6SDag-Erling Smørgravblowfish-cbc 415a0ee8cc6SDag-Erling Smørgrav.It 416a0ee8cc6SDag-Erling Smørgravcast128-cbc 417a0ee8cc6SDag-Erling Smørgrav.It 418a0ee8cc6SDag-Erling Smørgravchacha20-poly1305@openssh.com 419a0ee8cc6SDag-Erling Smørgrav.El 420f7167e0eSDag-Erling Smørgrav.Pp 421333ee039SDag-Erling SmørgravThe default is: 422a0ee8cc6SDag-Erling Smørgrav.Bd -literal -offset indent 423a0ee8cc6SDag-Erling Smørgravaes128-ctr,aes192-ctr,aes256-ctr, 4246888a9beSDag-Erling Smørgravaes128-gcm@openssh.com,aes256-gcm@openssh.com, 425a0ee8cc6SDag-Erling Smørgravchacha20-poly1305@openssh.com 426545d5ecaSDag-Erling Smørgrav.Ed 427f7167e0eSDag-Erling Smørgrav.Pp 428f7167e0eSDag-Erling SmørgravThe list of available ciphers may also be obtained using the 429f7167e0eSDag-Erling Smørgrav.Fl Q 430f7167e0eSDag-Erling Smørgravoption of 431*bc5531deSDag-Erling Smørgrav.Xr ssh 1 432*bc5531deSDag-Erling Smørgravwith an argument of 433*bc5531deSDag-Erling Smørgrav.Dq cipher . 434545d5ecaSDag-Erling Smørgrav.It Cm ClientAliveCountMax 435b74df5b2SDag-Erling SmørgravSets the number of client alive messages (see below) which may be 436545d5ecaSDag-Erling Smørgravsent without 437333ee039SDag-Erling Smørgrav.Xr sshd 8 438cf2b5f3bSDag-Erling Smørgravreceiving any messages back from the client. 439cf2b5f3bSDag-Erling SmørgravIf this threshold is reached while client alive messages are being sent, 440333ee039SDag-Erling Smørgravsshd will disconnect the client, terminating the session. 441cf2b5f3bSDag-Erling SmørgravIt is important to note that the use of client alive messages is very 442cf2b5f3bSDag-Erling Smørgravdifferent from 4431ec0d754SDag-Erling Smørgrav.Cm TCPKeepAlive 444cf2b5f3bSDag-Erling Smørgrav(below). 445cf2b5f3bSDag-Erling SmørgravThe client alive messages are sent through the encrypted channel 446cf2b5f3bSDag-Erling Smørgravand therefore will not be spoofable. 447cf2b5f3bSDag-Erling SmørgravThe TCP keepalive option enabled by 4481ec0d754SDag-Erling Smørgrav.Cm TCPKeepAlive 449cf2b5f3bSDag-Erling Smørgravis spoofable. 450cf2b5f3bSDag-Erling SmørgravThe client alive mechanism is valuable when the client or 451545d5ecaSDag-Erling Smørgravserver depend on knowing when a connection has become inactive. 452545d5ecaSDag-Erling Smørgrav.Pp 453cf2b5f3bSDag-Erling SmørgravThe default value is 3. 454cf2b5f3bSDag-Erling SmørgravIf 455545d5ecaSDag-Erling Smørgrav.Cm ClientAliveInterval 456b74df5b2SDag-Erling Smørgrav(see below) is set to 15, and 457545d5ecaSDag-Erling Smørgrav.Cm ClientAliveCountMax 458333ee039SDag-Erling Smørgravis left at the default, unresponsive SSH clients 459545d5ecaSDag-Erling Smørgravwill be disconnected after approximately 45 seconds. 460333ee039SDag-Erling SmørgravThis option applies to protocol version 2 only. 461d4ecd108SDag-Erling Smørgrav.It Cm ClientAliveInterval 462d4ecd108SDag-Erling SmørgravSets a timeout interval in seconds after which if no data has been received 463d4ecd108SDag-Erling Smørgravfrom the client, 464333ee039SDag-Erling Smørgrav.Xr sshd 8 465d4ecd108SDag-Erling Smørgravwill send a message through the encrypted 466d4ecd108SDag-Erling Smørgravchannel to request a response from the client. 467d4ecd108SDag-Erling SmørgravThe default 468d4ecd108SDag-Erling Smørgravis 0, indicating that these messages will not be sent to the client. 469d4ecd108SDag-Erling SmørgravThis option applies to protocol version 2 only. 470545d5ecaSDag-Erling Smørgrav.It Cm Compression 471d4ecd108SDag-Erling SmørgravSpecifies whether compression is allowed, or delayed until 472d4ecd108SDag-Erling Smørgravthe user has authenticated successfully. 473545d5ecaSDag-Erling SmørgravThe argument must be 474d4ecd108SDag-Erling Smørgrav.Dq yes , 475d4ecd108SDag-Erling Smørgrav.Dq delayed , 476545d5ecaSDag-Erling Smørgravor 477545d5ecaSDag-Erling Smørgrav.Dq no . 478545d5ecaSDag-Erling SmørgravThe default is 479d4ecd108SDag-Erling Smørgrav.Dq delayed . 480545d5ecaSDag-Erling Smørgrav.It Cm DenyGroups 481545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of group name patterns, separated 482545d5ecaSDag-Erling Smørgravby spaces. 483545d5ecaSDag-Erling SmørgravLogin is disallowed for users whose primary group or supplementary 484545d5ecaSDag-Erling Smørgravgroup list matches one of the patterns. 485545d5ecaSDag-Erling SmørgravOnly group names are valid; a numerical group ID is not recognized. 486545d5ecaSDag-Erling SmørgravBy default, login is allowed for all groups. 487333ee039SDag-Erling SmørgravThe allow/deny directives are processed in the following order: 488333ee039SDag-Erling Smørgrav.Cm DenyUsers , 489333ee039SDag-Erling Smørgrav.Cm AllowUsers , 490333ee039SDag-Erling Smørgrav.Cm DenyGroups , 491333ee039SDag-Erling Smørgravand finally 492333ee039SDag-Erling Smørgrav.Cm AllowGroups . 493333ee039SDag-Erling Smørgrav.Pp 494e4a9863fSDag-Erling SmørgravSee PATTERNS in 495333ee039SDag-Erling Smørgrav.Xr ssh_config 5 496333ee039SDag-Erling Smørgravfor more information on patterns. 497545d5ecaSDag-Erling Smørgrav.It Cm DenyUsers 498545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of user name patterns, separated 499545d5ecaSDag-Erling Smørgravby spaces. 500545d5ecaSDag-Erling SmørgravLogin is disallowed for user names that match one of the patterns. 501545d5ecaSDag-Erling SmørgravOnly user names are valid; a numerical user ID is not recognized. 502545d5ecaSDag-Erling SmørgravBy default, login is allowed for all users. 503545d5ecaSDag-Erling SmørgravIf the pattern takes the form USER@HOST then USER and HOST 504545d5ecaSDag-Erling Smørgravare separately checked, restricting logins to particular 505545d5ecaSDag-Erling Smørgravusers from particular hosts. 506333ee039SDag-Erling SmørgravThe allow/deny directives are processed in the following order: 507333ee039SDag-Erling Smørgrav.Cm DenyUsers , 508333ee039SDag-Erling Smørgrav.Cm AllowUsers , 509333ee039SDag-Erling Smørgrav.Cm DenyGroups , 510333ee039SDag-Erling Smørgravand finally 511333ee039SDag-Erling Smørgrav.Cm AllowGroups . 512333ee039SDag-Erling Smørgrav.Pp 513e4a9863fSDag-Erling SmørgravSee PATTERNS in 514333ee039SDag-Erling Smørgrav.Xr ssh_config 5 515333ee039SDag-Erling Smørgravfor more information on patterns. 516*bc5531deSDag-Erling Smørgrav.It Cm FingerprintHash 517*bc5531deSDag-Erling SmørgravSpecifies the hash algorithm used when logging key fingerprints. 518*bc5531deSDag-Erling SmørgravValid options are: 519*bc5531deSDag-Erling Smørgrav.Dq md5 520*bc5531deSDag-Erling Smørgravand 521*bc5531deSDag-Erling Smørgrav.Dq sha256 . 522*bc5531deSDag-Erling SmørgravThe default is 523*bc5531deSDag-Erling Smørgrav.Dq sha256 . 524333ee039SDag-Erling Smørgrav.It Cm ForceCommand 525333ee039SDag-Erling SmørgravForces the execution of the command specified by 526333ee039SDag-Erling Smørgrav.Cm ForceCommand , 527d4af9e69SDag-Erling Smørgravignoring any command supplied by the client and 528d4af9e69SDag-Erling Smørgrav.Pa ~/.ssh/rc 529d4af9e69SDag-Erling Smørgravif present. 530333ee039SDag-Erling SmørgravThe command is invoked by using the user's login shell with the -c option. 531333ee039SDag-Erling SmørgravThis applies to shell, command, or subsystem execution. 532333ee039SDag-Erling SmørgravIt is most useful inside a 533333ee039SDag-Erling Smørgrav.Cm Match 534333ee039SDag-Erling Smørgravblock. 535333ee039SDag-Erling SmørgravThe command originally supplied by the client is available in the 536333ee039SDag-Erling Smørgrav.Ev SSH_ORIGINAL_COMMAND 537333ee039SDag-Erling Smørgravenvironment variable. 538d4af9e69SDag-Erling SmørgravSpecifying a command of 539d4af9e69SDag-Erling Smørgrav.Dq internal-sftp 540d4af9e69SDag-Erling Smørgravwill force the use of an in-process sftp server that requires no support 541d4af9e69SDag-Erling Smørgravfiles when used with 542d4af9e69SDag-Erling Smørgrav.Cm ChrootDirectory . 543545d5ecaSDag-Erling Smørgrav.It Cm GatewayPorts 544545d5ecaSDag-Erling SmørgravSpecifies whether remote hosts are allowed to connect to ports 545545d5ecaSDag-Erling Smørgravforwarded for the client. 546545d5ecaSDag-Erling SmørgravBy default, 547333ee039SDag-Erling Smørgrav.Xr sshd 8 548e73e9afaSDag-Erling Smørgravbinds remote port forwardings to the loopback address. 549e73e9afaSDag-Erling SmørgravThis prevents other remote hosts from connecting to forwarded ports. 550545d5ecaSDag-Erling Smørgrav.Cm GatewayPorts 551333ee039SDag-Erling Smørgravcan be used to specify that sshd 552aa49c926SDag-Erling Smørgravshould allow remote port forwardings to bind to non-loopback addresses, thus 553aa49c926SDag-Erling Smørgravallowing other hosts to connect. 554aa49c926SDag-Erling SmørgravThe argument may be 555aa49c926SDag-Erling Smørgrav.Dq no 556aa49c926SDag-Erling Smørgravto force remote port forwardings to be available to the local host only, 557545d5ecaSDag-Erling Smørgrav.Dq yes 558aa49c926SDag-Erling Smørgravto force remote port forwardings to bind to the wildcard address, or 559aa49c926SDag-Erling Smørgrav.Dq clientspecified 560aa49c926SDag-Erling Smørgravto allow the client to select the address to which the forwarding is bound. 561545d5ecaSDag-Erling SmørgravThe default is 562545d5ecaSDag-Erling Smørgrav.Dq no . 563cf2b5f3bSDag-Erling Smørgrav.It Cm GSSAPIAuthentication 564cf2b5f3bSDag-Erling SmørgravSpecifies whether user authentication based on GSSAPI is allowed. 565cf2b5f3bSDag-Erling SmørgravThe default is 566cf2b5f3bSDag-Erling Smørgrav.Dq no . 567cf2b5f3bSDag-Erling SmørgravNote that this option applies to protocol version 2 only. 568cf2b5f3bSDag-Erling Smørgrav.It Cm GSSAPICleanupCredentials 569cf2b5f3bSDag-Erling SmørgravSpecifies whether to automatically destroy the user's credentials cache 570cf2b5f3bSDag-Erling Smørgravon logout. 571cf2b5f3bSDag-Erling SmørgravThe default is 572cf2b5f3bSDag-Erling Smørgrav.Dq yes . 573cf2b5f3bSDag-Erling SmørgravNote that this option applies to protocol version 2 only. 574*bc5531deSDag-Erling Smørgrav.It Cm HostbasedAcceptedKeyTypes 575*bc5531deSDag-Erling SmørgravSpecifies the key types that will be accepted for hostbased authentication 576*bc5531deSDag-Erling Smørgravas a comma-separated pattern list. 577*bc5531deSDag-Erling SmørgravThe default 578*bc5531deSDag-Erling Smørgrav.Dq * 579*bc5531deSDag-Erling Smørgravwill allow all key types. 580*bc5531deSDag-Erling SmørgravThe 581*bc5531deSDag-Erling Smørgrav.Fl Q 582*bc5531deSDag-Erling Smørgravoption of 583*bc5531deSDag-Erling Smørgrav.Xr ssh 1 584*bc5531deSDag-Erling Smørgravmay be used to list supported key types. 585545d5ecaSDag-Erling Smørgrav.It Cm HostbasedAuthentication 586545d5ecaSDag-Erling SmørgravSpecifies whether rhosts or /etc/hosts.equiv authentication together 587545d5ecaSDag-Erling Smørgravwith successful public key client host authentication is allowed 588333ee039SDag-Erling Smørgrav(host-based authentication). 589545d5ecaSDag-Erling SmørgravThis option is similar to 590545d5ecaSDag-Erling Smørgrav.Cm RhostsRSAAuthentication 591545d5ecaSDag-Erling Smørgravand applies to protocol version 2 only. 592545d5ecaSDag-Erling SmørgravThe default is 593545d5ecaSDag-Erling Smørgrav.Dq no . 594333ee039SDag-Erling Smørgrav.It Cm HostbasedUsesNameFromPacketOnly 595333ee039SDag-Erling SmørgravSpecifies whether or not the server will attempt to perform a reverse 596333ee039SDag-Erling Smørgravname lookup when matching the name in the 597333ee039SDag-Erling Smørgrav.Pa ~/.shosts , 598333ee039SDag-Erling Smørgrav.Pa ~/.rhosts , 599333ee039SDag-Erling Smørgravand 600333ee039SDag-Erling Smørgrav.Pa /etc/hosts.equiv 601333ee039SDag-Erling Smørgravfiles during 602333ee039SDag-Erling Smørgrav.Cm HostbasedAuthentication . 603333ee039SDag-Erling SmørgravA setting of 604333ee039SDag-Erling Smørgrav.Dq yes 605333ee039SDag-Erling Smørgravmeans that 606333ee039SDag-Erling Smørgrav.Xr sshd 8 607333ee039SDag-Erling Smørgravuses the name supplied by the client rather than 608333ee039SDag-Erling Smørgravattempting to resolve the name from the TCP connection itself. 609333ee039SDag-Erling SmørgravThe default is 610333ee039SDag-Erling Smørgrav.Dq no . 611b15c8340SDag-Erling Smørgrav.It Cm HostCertificate 612b15c8340SDag-Erling SmørgravSpecifies a file containing a public host certificate. 613b15c8340SDag-Erling SmørgravThe certificate's public key must match a private host key already specified 614b15c8340SDag-Erling Smørgravby 615b15c8340SDag-Erling Smørgrav.Cm HostKey . 616b15c8340SDag-Erling SmørgravThe default behaviour of 617b15c8340SDag-Erling Smørgrav.Xr sshd 8 618b15c8340SDag-Erling Smørgravis not to load any certificates. 619545d5ecaSDag-Erling Smørgrav.It Cm HostKey 620545d5ecaSDag-Erling SmørgravSpecifies a file containing a private host key 621545d5ecaSDag-Erling Smørgravused by SSH. 622545d5ecaSDag-Erling SmørgravThe default is 623545d5ecaSDag-Erling Smørgrav.Pa /etc/ssh/ssh_host_key 624545d5ecaSDag-Erling Smørgravfor protocol version 1, and 6254a421b63SDag-Erling Smørgrav.Pa /etc/ssh/ssh_host_dsa_key , 626f7167e0eSDag-Erling Smørgrav.Pa /etc/ssh/ssh_host_ecdsa_key , 627f7167e0eSDag-Erling Smørgrav.Pa /etc/ssh/ssh_host_ed25519_key 628d4af9e69SDag-Erling Smørgravand 6294a421b63SDag-Erling Smørgrav.Pa /etc/ssh/ssh_host_rsa_key 630545d5ecaSDag-Erling Smørgravfor protocol version 2. 631545d5ecaSDag-Erling SmørgravNote that 632333ee039SDag-Erling Smørgrav.Xr sshd 8 633545d5ecaSDag-Erling Smørgravwill refuse to use a file if it is group/world-accessible. 634545d5ecaSDag-Erling SmørgravIt is possible to have multiple host key files. 635545d5ecaSDag-Erling Smørgrav.Dq rsa1 636545d5ecaSDag-Erling Smørgravkeys are used for version 1 and 6374a421b63SDag-Erling Smørgrav.Dq dsa , 638f7167e0eSDag-Erling Smørgrav.Dq ecdsa , 639f7167e0eSDag-Erling Smørgrav.Dq ed25519 640545d5ecaSDag-Erling Smørgravor 641545d5ecaSDag-Erling Smørgrav.Dq rsa 642545d5ecaSDag-Erling Smørgravare used for version 2 of the SSH protocol. 643e4a9863fSDag-Erling SmørgravIt is also possible to specify public host key files instead. 644e4a9863fSDag-Erling SmørgravIn this case operations on the private key will be delegated 645e4a9863fSDag-Erling Smørgravto an 646e4a9863fSDag-Erling Smørgrav.Xr ssh-agent 1 . 647e4a9863fSDag-Erling Smørgrav.It Cm HostKeyAgent 648e4a9863fSDag-Erling SmørgravIdentifies the UNIX-domain socket used to communicate 649e4a9863fSDag-Erling Smørgravwith an agent that has access to the private host keys. 650e4a9863fSDag-Erling SmørgravIf 651e4a9863fSDag-Erling Smørgrav.Dq SSH_AUTH_SOCK 652e4a9863fSDag-Erling Smørgravis specified, the location of the socket will be read from the 653e4a9863fSDag-Erling Smørgrav.Ev SSH_AUTH_SOCK 654e4a9863fSDag-Erling Smørgravenvironment variable. 655545d5ecaSDag-Erling Smørgrav.It Cm IgnoreRhosts 656545d5ecaSDag-Erling SmørgravSpecifies that 657545d5ecaSDag-Erling Smørgrav.Pa .rhosts 658545d5ecaSDag-Erling Smørgravand 659545d5ecaSDag-Erling Smørgrav.Pa .shosts 660545d5ecaSDag-Erling Smørgravfiles will not be used in 661545d5ecaSDag-Erling Smørgrav.Cm RhostsRSAAuthentication 662545d5ecaSDag-Erling Smørgravor 663545d5ecaSDag-Erling Smørgrav.Cm HostbasedAuthentication . 664545d5ecaSDag-Erling Smørgrav.Pp 665545d5ecaSDag-Erling Smørgrav.Pa /etc/hosts.equiv 666545d5ecaSDag-Erling Smørgravand 66735d4ccfbSDag-Erling Smørgrav.Pa /etc/ssh/shosts.equiv 668545d5ecaSDag-Erling Smørgravare still used. 669545d5ecaSDag-Erling SmørgravThe default is 670545d5ecaSDag-Erling Smørgrav.Dq yes . 671545d5ecaSDag-Erling Smørgrav.It Cm IgnoreUserKnownHosts 672545d5ecaSDag-Erling SmørgravSpecifies whether 673333ee039SDag-Erling Smørgrav.Xr sshd 8 674545d5ecaSDag-Erling Smørgravshould ignore the user's 675d4ecd108SDag-Erling Smørgrav.Pa ~/.ssh/known_hosts 676545d5ecaSDag-Erling Smørgravduring 677545d5ecaSDag-Erling Smørgrav.Cm RhostsRSAAuthentication 678545d5ecaSDag-Erling Smørgravor 679545d5ecaSDag-Erling Smørgrav.Cm HostbasedAuthentication . 680545d5ecaSDag-Erling SmørgravThe default is 681545d5ecaSDag-Erling Smørgrav.Dq no . 6824a421b63SDag-Erling Smørgrav.It Cm IPQoS 6834a421b63SDag-Erling SmørgravSpecifies the IPv4 type-of-service or DSCP class for the connection. 6844a421b63SDag-Erling SmørgravAccepted values are 6854a421b63SDag-Erling Smørgrav.Dq af11 , 6864a421b63SDag-Erling Smørgrav.Dq af12 , 6874a421b63SDag-Erling Smørgrav.Dq af13 , 688462c32cbSDag-Erling Smørgrav.Dq af21 , 6894a421b63SDag-Erling Smørgrav.Dq af22 , 6904a421b63SDag-Erling Smørgrav.Dq af23 , 6914a421b63SDag-Erling Smørgrav.Dq af31 , 6924a421b63SDag-Erling Smørgrav.Dq af32 , 6934a421b63SDag-Erling Smørgrav.Dq af33 , 6944a421b63SDag-Erling Smørgrav.Dq af41 , 6954a421b63SDag-Erling Smørgrav.Dq af42 , 6964a421b63SDag-Erling Smørgrav.Dq af43 , 6974a421b63SDag-Erling Smørgrav.Dq cs0 , 6984a421b63SDag-Erling Smørgrav.Dq cs1 , 6994a421b63SDag-Erling Smørgrav.Dq cs2 , 7004a421b63SDag-Erling Smørgrav.Dq cs3 , 7014a421b63SDag-Erling Smørgrav.Dq cs4 , 7024a421b63SDag-Erling Smørgrav.Dq cs5 , 7034a421b63SDag-Erling Smørgrav.Dq cs6 , 7044a421b63SDag-Erling Smørgrav.Dq cs7 , 7054a421b63SDag-Erling Smørgrav.Dq ef , 7064a421b63SDag-Erling Smørgrav.Dq lowdelay , 7074a421b63SDag-Erling Smørgrav.Dq throughput , 7084a421b63SDag-Erling Smørgrav.Dq reliability , 7094a421b63SDag-Erling Smørgravor a numeric value. 7104a421b63SDag-Erling SmørgravThis option may take one or two arguments, separated by whitespace. 7114a421b63SDag-Erling SmørgravIf one argument is specified, it is used as the packet class unconditionally. 7124a421b63SDag-Erling SmørgravIf two values are specified, the first is automatically selected for 7134a421b63SDag-Erling Smørgravinteractive sessions and the second for non-interactive sessions. 7144a421b63SDag-Erling SmørgravThe default is 7154a421b63SDag-Erling Smørgrav.Dq lowdelay 7164a421b63SDag-Erling Smørgravfor interactive sessions and 7174a421b63SDag-Erling Smørgrav.Dq throughput 7184a421b63SDag-Erling Smørgravfor non-interactive sessions. 719b83788ffSDag-Erling Smørgrav.It Cm KbdInteractiveAuthentication 720b83788ffSDag-Erling SmørgravSpecifies whether to allow keyboard-interactive authentication. 721b83788ffSDag-Erling SmørgravThe argument to this keyword must be 722b83788ffSDag-Erling Smørgrav.Dq yes 723b83788ffSDag-Erling Smørgravor 724b83788ffSDag-Erling Smørgrav.Dq no . 725b83788ffSDag-Erling SmørgravThe default is to use whatever value 726b83788ffSDag-Erling Smørgrav.Cm ChallengeResponseAuthentication 727b83788ffSDag-Erling Smørgravis set to 728b83788ffSDag-Erling Smørgrav(by default 729b83788ffSDag-Erling Smørgrav.Dq yes ) . 730545d5ecaSDag-Erling Smørgrav.It Cm KerberosAuthentication 731cf2b5f3bSDag-Erling SmørgravSpecifies whether the password provided by the user for 732545d5ecaSDag-Erling Smørgrav.Cm PasswordAuthentication 733cf2b5f3bSDag-Erling Smørgravwill be validated through the Kerberos KDC. 734545d5ecaSDag-Erling SmørgravTo use this option, the server needs a 735545d5ecaSDag-Erling SmørgravKerberos servtab which allows the verification of the KDC's identity. 736333ee039SDag-Erling SmørgravThe default is 737545d5ecaSDag-Erling Smørgrav.Dq no . 7385962c0e9SDag-Erling Smørgrav.It Cm KerberosGetAFSToken 739b74df5b2SDag-Erling SmørgravIf AFS is active and the user has a Kerberos 5 TGT, attempt to acquire 7405962c0e9SDag-Erling Smørgravan AFS token before accessing the user's home directory. 741333ee039SDag-Erling SmørgravThe default is 7425962c0e9SDag-Erling Smørgrav.Dq no . 743545d5ecaSDag-Erling Smørgrav.It Cm KerberosOrLocalPasswd 744333ee039SDag-Erling SmørgravIf password authentication through Kerberos fails then 745545d5ecaSDag-Erling Smørgravthe password will be validated via any additional local mechanism 746545d5ecaSDag-Erling Smørgravsuch as 747545d5ecaSDag-Erling Smørgrav.Pa /etc/passwd . 748333ee039SDag-Erling SmørgravThe default is 749545d5ecaSDag-Erling Smørgrav.Dq yes . 750545d5ecaSDag-Erling Smørgrav.It Cm KerberosTicketCleanup 751545d5ecaSDag-Erling SmørgravSpecifies whether to automatically destroy the user's ticket cache 752545d5ecaSDag-Erling Smørgravfile on logout. 753333ee039SDag-Erling SmørgravThe default is 754545d5ecaSDag-Erling Smørgrav.Dq yes . 7554a421b63SDag-Erling Smørgrav.It Cm KexAlgorithms 7564a421b63SDag-Erling SmørgravSpecifies the available KEX (Key Exchange) algorithms. 7574a421b63SDag-Erling SmørgravMultiple algorithms must be comma-separated. 758a0ee8cc6SDag-Erling SmørgravThe supported algorithms are: 759a0ee8cc6SDag-Erling Smørgrav.Pp 760a0ee8cc6SDag-Erling Smørgrav.Bl -item -compact -offset indent 761a0ee8cc6SDag-Erling Smørgrav.It 762a0ee8cc6SDag-Erling Smørgravcurve25519-sha256@libssh.org 763a0ee8cc6SDag-Erling Smørgrav.It 764a0ee8cc6SDag-Erling Smørgravdiffie-hellman-group1-sha1 765a0ee8cc6SDag-Erling Smørgrav.It 766a0ee8cc6SDag-Erling Smørgravdiffie-hellman-group14-sha1 767a0ee8cc6SDag-Erling Smørgrav.It 768a0ee8cc6SDag-Erling Smørgravdiffie-hellman-group-exchange-sha1 769a0ee8cc6SDag-Erling Smørgrav.It 770a0ee8cc6SDag-Erling Smørgravdiffie-hellman-group-exchange-sha256 771a0ee8cc6SDag-Erling Smørgrav.It 772a0ee8cc6SDag-Erling Smørgravecdh-sha2-nistp256 773a0ee8cc6SDag-Erling Smørgrav.It 774a0ee8cc6SDag-Erling Smørgravecdh-sha2-nistp384 775a0ee8cc6SDag-Erling Smørgrav.It 776a0ee8cc6SDag-Erling Smørgravecdh-sha2-nistp521 777a0ee8cc6SDag-Erling Smørgrav.El 778a0ee8cc6SDag-Erling Smørgrav.Pp 779a0ee8cc6SDag-Erling SmørgravThe default is: 780f7167e0eSDag-Erling Smørgrav.Bd -literal -offset indent 781f7167e0eSDag-Erling Smørgravcurve25519-sha256@libssh.org, 782f7167e0eSDag-Erling Smørgravecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 783f7167e0eSDag-Erling Smørgravdiffie-hellman-group-exchange-sha256, 784a0ee8cc6SDag-Erling Smørgravdiffie-hellman-group14-sha1 785f7167e0eSDag-Erling Smørgrav.Ed 786*bc5531deSDag-Erling Smørgrav.Pp 787*bc5531deSDag-Erling SmørgravThe list of available key exchange algorithms may also be obtained using the 788*bc5531deSDag-Erling Smørgrav.Fl Q 789*bc5531deSDag-Erling Smørgravoption of 790*bc5531deSDag-Erling Smørgrav.Xr ssh 1 791*bc5531deSDag-Erling Smørgravwith an argument of 792*bc5531deSDag-Erling Smørgrav.Dq kex . 793545d5ecaSDag-Erling Smørgrav.It Cm KeyRegenerationInterval 794545d5ecaSDag-Erling SmørgravIn protocol version 1, the ephemeral server key is automatically regenerated 795545d5ecaSDag-Erling Smørgravafter this many seconds (if it has been used). 796545d5ecaSDag-Erling SmørgravThe purpose of regeneration is to prevent 797545d5ecaSDag-Erling Smørgravdecrypting captured sessions by later breaking into the machine and 798545d5ecaSDag-Erling Smørgravstealing the keys. 799545d5ecaSDag-Erling SmørgravThe key is never stored anywhere. 800545d5ecaSDag-Erling SmørgravIf the value is 0, the key is never regenerated. 801545d5ecaSDag-Erling SmørgravThe default is 3600 (seconds). 802545d5ecaSDag-Erling Smørgrav.It Cm ListenAddress 803545d5ecaSDag-Erling SmørgravSpecifies the local addresses 804333ee039SDag-Erling Smørgrav.Xr sshd 8 805545d5ecaSDag-Erling Smørgravshould listen on. 806545d5ecaSDag-Erling SmørgravThe following forms may be used: 807545d5ecaSDag-Erling Smørgrav.Pp 808545d5ecaSDag-Erling Smørgrav.Bl -item -offset indent -compact 809545d5ecaSDag-Erling Smørgrav.It 810545d5ecaSDag-Erling Smørgrav.Cm ListenAddress 811545d5ecaSDag-Erling Smørgrav.Sm off 812*bc5531deSDag-Erling Smørgrav.Ar host | Ar IPv4_addr | Ar IPv6_addr 813545d5ecaSDag-Erling Smørgrav.Sm on 814545d5ecaSDag-Erling Smørgrav.It 815545d5ecaSDag-Erling Smørgrav.Cm ListenAddress 816545d5ecaSDag-Erling Smørgrav.Sm off 817*bc5531deSDag-Erling Smørgrav.Ar host | Ar IPv4_addr : Ar port 818545d5ecaSDag-Erling Smørgrav.Sm on 819545d5ecaSDag-Erling Smørgrav.It 820545d5ecaSDag-Erling Smørgrav.Cm ListenAddress 821545d5ecaSDag-Erling Smørgrav.Sm off 822545d5ecaSDag-Erling Smørgrav.Oo 823*bc5531deSDag-Erling Smørgrav.Ar host | Ar IPv6_addr Oc : Ar port 824545d5ecaSDag-Erling Smørgrav.Sm on 825545d5ecaSDag-Erling Smørgrav.El 826545d5ecaSDag-Erling Smørgrav.Pp 827545d5ecaSDag-Erling SmørgravIf 828545d5ecaSDag-Erling Smørgrav.Ar port 829545d5ecaSDag-Erling Smørgravis not specified, 830333ee039SDag-Erling Smørgravsshd will listen on the address and all prior 831545d5ecaSDag-Erling Smørgrav.Cm Port 832cf2b5f3bSDag-Erling Smørgravoptions specified. 833cf2b5f3bSDag-Erling SmørgravThe default is to listen on all local addresses. 834e73e9afaSDag-Erling SmørgravMultiple 835545d5ecaSDag-Erling Smørgrav.Cm ListenAddress 836cf2b5f3bSDag-Erling Smørgravoptions are permitted. 837cf2b5f3bSDag-Erling SmørgravAdditionally, any 838545d5ecaSDag-Erling Smørgrav.Cm Port 839333ee039SDag-Erling Smørgravoptions must precede this option for non-port qualified addresses. 840545d5ecaSDag-Erling Smørgrav.It Cm LoginGraceTime 841545d5ecaSDag-Erling SmørgravThe server disconnects after this time if the user has not 842545d5ecaSDag-Erling Smørgravsuccessfully logged in. 843545d5ecaSDag-Erling SmørgravIf the value is 0, there is no time limit. 844f388f5efSDag-Erling SmørgravThe default is 120 seconds. 845545d5ecaSDag-Erling Smørgrav.It Cm LogLevel 846545d5ecaSDag-Erling SmørgravGives the verbosity level that is used when logging messages from 847333ee039SDag-Erling Smørgrav.Xr sshd 8 . 848545d5ecaSDag-Erling SmørgravThe possible values are: 849333ee039SDag-Erling SmørgravQUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. 850e73e9afaSDag-Erling SmørgravThe default is INFO. 851e73e9afaSDag-Erling SmørgravDEBUG and DEBUG1 are equivalent. 852e73e9afaSDag-Erling SmørgravDEBUG2 and DEBUG3 each specify higher levels of debugging output. 853e73e9afaSDag-Erling SmørgravLogging with a DEBUG level violates the privacy of users and is not recommended. 854545d5ecaSDag-Erling Smørgrav.It Cm MACs 855545d5ecaSDag-Erling SmørgravSpecifies the available MAC (message authentication code) algorithms. 856545d5ecaSDag-Erling SmørgravThe MAC algorithm is used in protocol version 2 857545d5ecaSDag-Erling Smørgravfor data integrity protection. 858545d5ecaSDag-Erling SmørgravMultiple algorithms must be comma-separated. 8596888a9beSDag-Erling SmørgravThe algorithms that contain 8606888a9beSDag-Erling Smørgrav.Dq -etm 8616888a9beSDag-Erling Smørgravcalculate the MAC after encryption (encrypt-then-mac). 8626888a9beSDag-Erling SmørgravThese are considered safer and their use recommended. 863a0ee8cc6SDag-Erling SmørgravThe supported MACs are: 864a0ee8cc6SDag-Erling Smørgrav.Pp 865a0ee8cc6SDag-Erling Smørgrav.Bl -item -compact -offset indent 866a0ee8cc6SDag-Erling Smørgrav.It 867a0ee8cc6SDag-Erling Smørgravhmac-md5 868a0ee8cc6SDag-Erling Smørgrav.It 869a0ee8cc6SDag-Erling Smørgravhmac-md5-96 870a0ee8cc6SDag-Erling Smørgrav.It 871a0ee8cc6SDag-Erling Smørgravhmac-ripemd160 872a0ee8cc6SDag-Erling Smørgrav.It 873a0ee8cc6SDag-Erling Smørgravhmac-sha1 874a0ee8cc6SDag-Erling Smørgrav.It 875a0ee8cc6SDag-Erling Smørgravhmac-sha1-96 876a0ee8cc6SDag-Erling Smørgrav.It 877a0ee8cc6SDag-Erling Smørgravhmac-sha2-256 878a0ee8cc6SDag-Erling Smørgrav.It 879a0ee8cc6SDag-Erling Smørgravhmac-sha2-512 880a0ee8cc6SDag-Erling Smørgrav.It 881a0ee8cc6SDag-Erling Smørgravumac-64@openssh.com 882a0ee8cc6SDag-Erling Smørgrav.It 883a0ee8cc6SDag-Erling Smørgravumac-128@openssh.com 884a0ee8cc6SDag-Erling Smørgrav.It 885a0ee8cc6SDag-Erling Smørgravhmac-md5-etm@openssh.com 886a0ee8cc6SDag-Erling Smørgrav.It 887a0ee8cc6SDag-Erling Smørgravhmac-md5-96-etm@openssh.com 888a0ee8cc6SDag-Erling Smørgrav.It 889a0ee8cc6SDag-Erling Smørgravhmac-ripemd160-etm@openssh.com 890a0ee8cc6SDag-Erling Smørgrav.It 891a0ee8cc6SDag-Erling Smørgravhmac-sha1-etm@openssh.com 892a0ee8cc6SDag-Erling Smørgrav.It 893a0ee8cc6SDag-Erling Smørgravhmac-sha1-96-etm@openssh.com 894a0ee8cc6SDag-Erling Smørgrav.It 895a0ee8cc6SDag-Erling Smørgravhmac-sha2-256-etm@openssh.com 896a0ee8cc6SDag-Erling Smørgrav.It 897a0ee8cc6SDag-Erling Smørgravhmac-sha2-512-etm@openssh.com 898a0ee8cc6SDag-Erling Smørgrav.It 899a0ee8cc6SDag-Erling Smørgravumac-64-etm@openssh.com 900a0ee8cc6SDag-Erling Smørgrav.It 901a0ee8cc6SDag-Erling Smørgravumac-128-etm@openssh.com 902a0ee8cc6SDag-Erling Smørgrav.El 903a0ee8cc6SDag-Erling Smørgrav.Pp 904333ee039SDag-Erling SmørgravThe default is: 905d4af9e69SDag-Erling Smørgrav.Bd -literal -offset indent 9066888a9beSDag-Erling Smørgravumac-64-etm@openssh.com,umac-128-etm@openssh.com, 9076888a9beSDag-Erling Smørgravhmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, 908a0ee8cc6SDag-Erling Smørgravumac-64@openssh.com,umac-128@openssh.com, 909a0ee8cc6SDag-Erling Smørgravhmac-sha2-256,hmac-sha2-512 910d4af9e69SDag-Erling Smørgrav.Ed 911*bc5531deSDag-Erling Smørgrav.Pp 912*bc5531deSDag-Erling SmørgravThe list of available MAC algorithms may also be obtained using the 913*bc5531deSDag-Erling Smørgrav.Fl Q 914*bc5531deSDag-Erling Smørgravoption of 915*bc5531deSDag-Erling Smørgrav.Xr ssh 1 916*bc5531deSDag-Erling Smørgravwith an argument of 917*bc5531deSDag-Erling Smørgrav.Dq mac . 918333ee039SDag-Erling Smørgrav.It Cm Match 919333ee039SDag-Erling SmørgravIntroduces a conditional block. 920333ee039SDag-Erling SmørgravIf all of the criteria on the 921333ee039SDag-Erling Smørgrav.Cm Match 922333ee039SDag-Erling Smørgravline are satisfied, the keywords on the following lines override those 923333ee039SDag-Erling Smørgravset in the global section of the config file, until either another 924333ee039SDag-Erling Smørgrav.Cm Match 925333ee039SDag-Erling Smørgravline or the end of the file. 926b83788ffSDag-Erling SmørgravIf a keyword appears in multiple 927b83788ffSDag-Erling Smørgrav.Cm Match 928*bc5531deSDag-Erling Smørgravblocks that are satisfied, only the first instance of the keyword is 929b83788ffSDag-Erling Smørgravapplied. 930d4af9e69SDag-Erling Smørgrav.Pp 931333ee039SDag-Erling SmørgravThe arguments to 932333ee039SDag-Erling Smørgrav.Cm Match 933f7167e0eSDag-Erling Smørgravare one or more criteria-pattern pairs or the single token 934f7167e0eSDag-Erling Smørgrav.Cm All 935f7167e0eSDag-Erling Smørgravwhich matches all criteria. 936333ee039SDag-Erling SmørgravThe available criteria are 937333ee039SDag-Erling Smørgrav.Cm User , 938333ee039SDag-Erling Smørgrav.Cm Group , 939333ee039SDag-Erling Smørgrav.Cm Host , 940462c32cbSDag-Erling Smørgrav.Cm LocalAddress , 941462c32cbSDag-Erling Smørgrav.Cm LocalPort , 942333ee039SDag-Erling Smørgravand 943333ee039SDag-Erling Smørgrav.Cm Address . 944d4af9e69SDag-Erling SmørgravThe match patterns may consist of single entries or comma-separated 945d4af9e69SDag-Erling Smørgravlists and may use the wildcard and negation operators described in the 946e4a9863fSDag-Erling SmørgravPATTERNS section of 947d4af9e69SDag-Erling Smørgrav.Xr ssh_config 5 . 948d4af9e69SDag-Erling Smørgrav.Pp 949d4af9e69SDag-Erling SmørgravThe patterns in an 950d4af9e69SDag-Erling Smørgrav.Cm Address 951d4af9e69SDag-Erling Smørgravcriteria may additionally contain addresses to match in CIDR 952d4af9e69SDag-Erling Smørgravaddress/masklen format, e.g.\& 953d4af9e69SDag-Erling Smørgrav.Dq 192.0.2.0/24 954d4af9e69SDag-Erling Smørgravor 955d4af9e69SDag-Erling Smørgrav.Dq 3ffe:ffff::/32 . 956d4af9e69SDag-Erling SmørgravNote that the mask length provided must be consistent with the address - 957d4af9e69SDag-Erling Smørgravit is an error to specify a mask length that is too long for the address 958d4af9e69SDag-Erling Smørgravor one with bits set in this host portion of the address. 959d4af9e69SDag-Erling SmørgravFor example, 960d4af9e69SDag-Erling Smørgrav.Dq 192.0.2.0/33 961d4af9e69SDag-Erling Smørgravand 962d4af9e69SDag-Erling Smørgrav.Dq 192.0.2.0/8 963d4af9e69SDag-Erling Smørgravrespectively. 964d4af9e69SDag-Erling Smørgrav.Pp 965333ee039SDag-Erling SmørgravOnly a subset of keywords may be used on the lines following a 966333ee039SDag-Erling Smørgrav.Cm Match 967333ee039SDag-Erling Smørgravkeyword. 968333ee039SDag-Erling SmørgravAvailable keywords are 969462c32cbSDag-Erling Smørgrav.Cm AcceptEnv , 970cce7d346SDag-Erling Smørgrav.Cm AllowAgentForwarding , 971462c32cbSDag-Erling Smørgrav.Cm AllowGroups , 972*bc5531deSDag-Erling Smørgrav.Cm AllowStreamLocalForwarding , 973333ee039SDag-Erling Smørgrav.Cm AllowTcpForwarding , 974462c32cbSDag-Erling Smørgrav.Cm AllowUsers , 9756888a9beSDag-Erling Smørgrav.Cm AuthenticationMethods , 9766888a9beSDag-Erling Smørgrav.Cm AuthorizedKeysCommand , 9776888a9beSDag-Erling Smørgrav.Cm AuthorizedKeysCommandUser , 978e2f6069cSDag-Erling Smørgrav.Cm AuthorizedKeysFile , 979e2f6069cSDag-Erling Smørgrav.Cm AuthorizedPrincipalsFile , 980d4af9e69SDag-Erling Smørgrav.Cm Banner , 981d4af9e69SDag-Erling Smørgrav.Cm ChrootDirectory , 982462c32cbSDag-Erling Smørgrav.Cm DenyGroups , 983462c32cbSDag-Erling Smørgrav.Cm DenyUsers , 984333ee039SDag-Erling Smørgrav.Cm ForceCommand , 985333ee039SDag-Erling Smørgrav.Cm GatewayPorts , 986d4af9e69SDag-Erling Smørgrav.Cm GSSAPIAuthentication , 987*bc5531deSDag-Erling Smørgrav.Cm HostbasedAcceptedKeyTypes , 988d4af9e69SDag-Erling Smørgrav.Cm HostbasedAuthentication , 989e2f6069cSDag-Erling Smørgrav.Cm HostbasedUsesNameFromPacketOnly , 990*bc5531deSDag-Erling Smørgrav.Cm IPQoS , 991d4af9e69SDag-Erling Smørgrav.Cm KbdInteractiveAuthentication , 992d4af9e69SDag-Erling Smørgrav.Cm KerberosAuthentication , 993d4af9e69SDag-Erling Smørgrav.Cm MaxAuthTries , 994d4af9e69SDag-Erling Smørgrav.Cm MaxSessions , 995d4af9e69SDag-Erling Smørgrav.Cm PasswordAuthentication , 996cce7d346SDag-Erling Smørgrav.Cm PermitEmptyPasswords , 997333ee039SDag-Erling Smørgrav.Cm PermitOpen , 998d4af9e69SDag-Erling Smørgrav.Cm PermitRootLogin , 999f7167e0eSDag-Erling Smørgrav.Cm PermitTTY , 1000e2f6069cSDag-Erling Smørgrav.Cm PermitTunnel , 1001a0ee8cc6SDag-Erling Smørgrav.Cm PermitUserRC , 1002*bc5531deSDag-Erling Smørgrav.Cm PubkeyAcceptedKeyTypes , 1003b15c8340SDag-Erling Smørgrav.Cm PubkeyAuthentication , 1004e4a9863fSDag-Erling Smørgrav.Cm RekeyLimit , 1005*bc5531deSDag-Erling Smørgrav.Cm RevokedKeys , 1006d4af9e69SDag-Erling Smørgrav.Cm RhostsRSAAuthentication , 1007d4af9e69SDag-Erling Smørgrav.Cm RSAAuthentication , 1008*bc5531deSDag-Erling Smørgrav.Cm StreamLocalBindMask , 1009*bc5531deSDag-Erling Smørgrav.Cm StreamLocalBindUnlink , 1010*bc5531deSDag-Erling Smørgrav.Cm TrustedUserCAKeys , 1011333ee039SDag-Erling Smørgrav.Cm X11DisplayOffset , 1012cce7d346SDag-Erling Smørgrav.Cm X11Forwarding 1013333ee039SDag-Erling Smørgravand 1014333ee039SDag-Erling Smørgrav.Cm X11UseLocalHost . 101521e764dfSDag-Erling Smørgrav.It Cm MaxAuthTries 101621e764dfSDag-Erling SmørgravSpecifies the maximum number of authentication attempts permitted per 101721e764dfSDag-Erling Smørgravconnection. 101821e764dfSDag-Erling SmørgravOnce the number of failures reaches half this value, 101921e764dfSDag-Erling Smørgravadditional failures are logged. 102021e764dfSDag-Erling SmørgravThe default is 6. 1021d4af9e69SDag-Erling Smørgrav.It Cm MaxSessions 1022d4af9e69SDag-Erling SmørgravSpecifies the maximum number of open sessions permitted per network connection. 1023d4af9e69SDag-Erling SmørgravThe default is 10. 1024545d5ecaSDag-Erling Smørgrav.It Cm MaxStartups 1025545d5ecaSDag-Erling SmørgravSpecifies the maximum number of concurrent unauthenticated connections to the 1026333ee039SDag-Erling SmørgravSSH daemon. 1027545d5ecaSDag-Erling SmørgravAdditional connections will be dropped until authentication succeeds or the 1028545d5ecaSDag-Erling Smørgrav.Cm LoginGraceTime 1029545d5ecaSDag-Erling Smørgravexpires for a connection. 10306888a9beSDag-Erling SmørgravThe default is 10:30:100. 1031545d5ecaSDag-Erling Smørgrav.Pp 1032545d5ecaSDag-Erling SmørgravAlternatively, random early drop can be enabled by specifying 1033545d5ecaSDag-Erling Smørgravthe three colon separated values 1034545d5ecaSDag-Erling Smørgrav.Dq start:rate:full 1035333ee039SDag-Erling Smørgrav(e.g. "10:30:60"). 1036333ee039SDag-Erling Smørgrav.Xr sshd 8 1037545d5ecaSDag-Erling Smørgravwill refuse connection attempts with a probability of 1038545d5ecaSDag-Erling Smørgrav.Dq rate/100 1039545d5ecaSDag-Erling Smørgrav(30%) 1040545d5ecaSDag-Erling Smørgravif there are currently 1041545d5ecaSDag-Erling Smørgrav.Dq start 1042545d5ecaSDag-Erling Smørgrav(10) 1043545d5ecaSDag-Erling Smørgravunauthenticated connections. 1044545d5ecaSDag-Erling SmørgravThe probability increases linearly and all connection attempts 1045545d5ecaSDag-Erling Smørgravare refused if the number of unauthenticated connections reaches 1046545d5ecaSDag-Erling Smørgrav.Dq full 1047545d5ecaSDag-Erling Smørgrav(60). 1048545d5ecaSDag-Erling Smørgrav.It Cm PasswordAuthentication 1049545d5ecaSDag-Erling SmørgravSpecifies whether password authentication is allowed. 1050d4af9e69SDag-Erling SmørgravSee also 1051d4af9e69SDag-Erling Smørgrav.Cm UsePAM . 1052545d5ecaSDag-Erling SmørgravThe default is 1053d4af9e69SDag-Erling Smørgrav.Dq no . 1054545d5ecaSDag-Erling Smørgrav.It Cm PermitEmptyPasswords 1055545d5ecaSDag-Erling SmørgravWhen password authentication is allowed, it specifies whether the 1056545d5ecaSDag-Erling Smørgravserver allows login to accounts with empty password strings. 1057545d5ecaSDag-Erling SmørgravThe default is 1058545d5ecaSDag-Erling Smørgrav.Dq no . 1059333ee039SDag-Erling Smørgrav.It Cm PermitOpen 1060333ee039SDag-Erling SmørgravSpecifies the destinations to which TCP port forwarding is permitted. 1061333ee039SDag-Erling SmørgravThe forwarding specification must be one of the following forms: 1062333ee039SDag-Erling Smørgrav.Pp 1063333ee039SDag-Erling Smørgrav.Bl -item -offset indent -compact 1064333ee039SDag-Erling Smørgrav.It 1065333ee039SDag-Erling Smørgrav.Cm PermitOpen 1066333ee039SDag-Erling Smørgrav.Sm off 1067333ee039SDag-Erling Smørgrav.Ar host : port 1068333ee039SDag-Erling Smørgrav.Sm on 1069333ee039SDag-Erling Smørgrav.It 1070333ee039SDag-Erling Smørgrav.Cm PermitOpen 1071333ee039SDag-Erling Smørgrav.Sm off 1072333ee039SDag-Erling Smørgrav.Ar IPv4_addr : port 1073333ee039SDag-Erling Smørgrav.Sm on 1074333ee039SDag-Erling Smørgrav.It 1075333ee039SDag-Erling Smørgrav.Cm PermitOpen 1076333ee039SDag-Erling Smørgrav.Sm off 1077333ee039SDag-Erling Smørgrav.Ar \&[ IPv6_addr \&] : port 1078333ee039SDag-Erling Smørgrav.Sm on 1079333ee039SDag-Erling Smørgrav.El 1080333ee039SDag-Erling Smørgrav.Pp 1081333ee039SDag-Erling SmørgravMultiple forwards may be specified by separating them with whitespace. 1082333ee039SDag-Erling SmørgravAn argument of 1083333ee039SDag-Erling Smørgrav.Dq any 1084333ee039SDag-Erling Smørgravcan be used to remove all restrictions and permit any forwarding requests. 1085462c32cbSDag-Erling SmørgravAn argument of 1086462c32cbSDag-Erling Smørgrav.Dq none 1087462c32cbSDag-Erling Smørgravcan be used to prohibit all forwarding requests. 1088333ee039SDag-Erling SmørgravBy default all port forwarding requests are permitted. 1089545d5ecaSDag-Erling Smørgrav.It Cm PermitRootLogin 1090545d5ecaSDag-Erling SmørgravSpecifies whether root can log in using 1091545d5ecaSDag-Erling Smørgrav.Xr ssh 1 . 1092545d5ecaSDag-Erling SmørgravThe argument must be 1093545d5ecaSDag-Erling Smørgrav.Dq yes , 1094545d5ecaSDag-Erling Smørgrav.Dq without-password , 1095333ee039SDag-Erling Smørgrav.Dq forced-commands-only , 1096545d5ecaSDag-Erling Smørgravor 1097545d5ecaSDag-Erling Smørgrav.Dq no . 1098545d5ecaSDag-Erling SmørgravThe default is 109935d4ccfbSDag-Erling Smørgrav.Dq no . 1100810a15b1SDag-Erling SmørgravNote that if 1101810a15b1SDag-Erling Smørgrav.Cm ChallengeResponseAuthentication 1102810a15b1SDag-Erling Smørgravis 1103810a15b1SDag-Erling Smørgrav.Dq yes , 1104810a15b1SDag-Erling Smørgravthe root user may be allowed in with its password even if 1105810a15b1SDag-Erling Smørgrav.Cm PermitRootLogin is set to 1106810a15b1SDag-Erling Smørgrav.Dq without-password . 1107545d5ecaSDag-Erling Smørgrav.Pp 1108545d5ecaSDag-Erling SmørgravIf this option is set to 1109333ee039SDag-Erling Smørgrav.Dq without-password , 1110aa49c926SDag-Erling Smørgravpassword authentication is disabled for root. 1111545d5ecaSDag-Erling Smørgrav.Pp 1112545d5ecaSDag-Erling SmørgravIf this option is set to 1113333ee039SDag-Erling Smørgrav.Dq forced-commands-only , 1114545d5ecaSDag-Erling Smørgravroot login with public key authentication will be allowed, 1115545d5ecaSDag-Erling Smørgravbut only if the 1116545d5ecaSDag-Erling Smørgrav.Ar command 1117545d5ecaSDag-Erling Smørgravoption has been specified 1118545d5ecaSDag-Erling Smørgrav(which may be useful for taking remote backups even if root login is 1119cf2b5f3bSDag-Erling Smørgravnormally not allowed). 1120cf2b5f3bSDag-Erling SmørgravAll other authentication methods are disabled for root. 1121545d5ecaSDag-Erling Smørgrav.Pp 1122545d5ecaSDag-Erling SmørgravIf this option is set to 1123333ee039SDag-Erling Smørgrav.Dq no , 1124545d5ecaSDag-Erling Smørgravroot is not allowed to log in. 1125b74df5b2SDag-Erling Smørgrav.It Cm PermitTunnel 1126b74df5b2SDag-Erling SmørgravSpecifies whether 1127b74df5b2SDag-Erling Smørgrav.Xr tun 4 1128b74df5b2SDag-Erling Smørgravdevice forwarding is allowed. 1129b74df5b2SDag-Erling SmørgravThe argument must be 1130b74df5b2SDag-Erling Smørgrav.Dq yes , 1131333ee039SDag-Erling Smørgrav.Dq point-to-point 1132333ee039SDag-Erling Smørgrav(layer 3), 1133b74df5b2SDag-Erling Smørgrav.Dq ethernet 1134333ee039SDag-Erling Smørgrav(layer 2), or 1135b74df5b2SDag-Erling Smørgrav.Dq no . 1136333ee039SDag-Erling SmørgravSpecifying 1137333ee039SDag-Erling Smørgrav.Dq yes 1138333ee039SDag-Erling Smørgravpermits both 1139333ee039SDag-Erling Smørgrav.Dq point-to-point 1140333ee039SDag-Erling Smørgravand 1141333ee039SDag-Erling Smørgrav.Dq ethernet . 1142b74df5b2SDag-Erling SmørgravThe default is 1143b74df5b2SDag-Erling Smørgrav.Dq no . 1144*bc5531deSDag-Erling Smørgrav.Pp 1145*bc5531deSDag-Erling SmørgravIndependent of this setting, the permissions of the selected 1146*bc5531deSDag-Erling Smørgrav.Xr tun 4 1147*bc5531deSDag-Erling Smørgravdevice must allow access to the user. 1148f7167e0eSDag-Erling Smørgrav.It Cm PermitTTY 1149f7167e0eSDag-Erling SmørgravSpecifies whether 1150f7167e0eSDag-Erling Smørgrav.Xr pty 4 1151f7167e0eSDag-Erling Smørgravallocation is permitted. 1152f7167e0eSDag-Erling SmørgravThe default is 1153f7167e0eSDag-Erling Smørgrav.Dq yes . 1154f388f5efSDag-Erling Smørgrav.It Cm PermitUserEnvironment 1155f388f5efSDag-Erling SmørgravSpecifies whether 1156f388f5efSDag-Erling Smørgrav.Pa ~/.ssh/environment 1157f388f5efSDag-Erling Smørgravand 1158f388f5efSDag-Erling Smørgrav.Cm environment= 1159f388f5efSDag-Erling Smørgravoptions in 1160f388f5efSDag-Erling Smørgrav.Pa ~/.ssh/authorized_keys 1161f388f5efSDag-Erling Smørgravare processed by 1162333ee039SDag-Erling Smørgrav.Xr sshd 8 . 1163f388f5efSDag-Erling SmørgravThe default is 1164f388f5efSDag-Erling Smørgrav.Dq no . 1165f388f5efSDag-Erling SmørgravEnabling environment processing may enable users to bypass access 1166f388f5efSDag-Erling Smørgravrestrictions in some configurations using mechanisms such as 1167f388f5efSDag-Erling Smørgrav.Ev LD_PRELOAD . 1168a0ee8cc6SDag-Erling Smørgrav.It Cm PermitUserRC 1169a0ee8cc6SDag-Erling SmørgravSpecifies whether any 1170a0ee8cc6SDag-Erling Smørgrav.Pa ~/.ssh/rc 1171a0ee8cc6SDag-Erling Smørgravfile is executed. 1172a0ee8cc6SDag-Erling SmørgravThe default is 1173a0ee8cc6SDag-Erling Smørgrav.Dq yes . 1174545d5ecaSDag-Erling Smørgrav.It Cm PidFile 1175a82e551fSDag-Erling SmørgravSpecifies the file that contains the process ID of the 1176333ee039SDag-Erling SmørgravSSH daemon. 1177545d5ecaSDag-Erling SmørgravThe default is 1178545d5ecaSDag-Erling Smørgrav.Pa /var/run/sshd.pid . 1179545d5ecaSDag-Erling Smørgrav.It Cm Port 1180545d5ecaSDag-Erling SmørgravSpecifies the port number that 1181333ee039SDag-Erling Smørgrav.Xr sshd 8 1182545d5ecaSDag-Erling Smørgravlistens on. 1183545d5ecaSDag-Erling SmørgravThe default is 22. 1184545d5ecaSDag-Erling SmørgravMultiple options of this type are permitted. 1185545d5ecaSDag-Erling SmørgravSee also 1186545d5ecaSDag-Erling Smørgrav.Cm ListenAddress . 1187545d5ecaSDag-Erling Smørgrav.It Cm PrintLastLog 1188545d5ecaSDag-Erling SmørgravSpecifies whether 1189333ee039SDag-Erling Smørgrav.Xr sshd 8 1190aa49c926SDag-Erling Smørgravshould print the date and time of the last user login when a user logs 1191aa49c926SDag-Erling Smørgravin interactively. 1192545d5ecaSDag-Erling SmørgravThe default is 1193545d5ecaSDag-Erling Smørgrav.Dq yes . 1194545d5ecaSDag-Erling Smørgrav.It Cm PrintMotd 1195545d5ecaSDag-Erling SmørgravSpecifies whether 1196333ee039SDag-Erling Smørgrav.Xr sshd 8 1197545d5ecaSDag-Erling Smørgravshould print 1198545d5ecaSDag-Erling Smørgrav.Pa /etc/motd 1199545d5ecaSDag-Erling Smørgravwhen a user logs in interactively. 1200545d5ecaSDag-Erling Smørgrav(On some systems it is also printed by the shell, 1201545d5ecaSDag-Erling Smørgrav.Pa /etc/profile , 1202545d5ecaSDag-Erling Smørgravor equivalent.) 1203545d5ecaSDag-Erling SmørgravThe default is 1204545d5ecaSDag-Erling Smørgrav.Dq yes . 1205545d5ecaSDag-Erling Smørgrav.It Cm Protocol 1206545d5ecaSDag-Erling SmørgravSpecifies the protocol versions 1207333ee039SDag-Erling Smørgrav.Xr sshd 8 1208f388f5efSDag-Erling Smørgravsupports. 1209545d5ecaSDag-Erling SmørgravThe possible values are 1210333ee039SDag-Erling Smørgrav.Sq 1 1211545d5ecaSDag-Erling Smørgravand 1212333ee039SDag-Erling Smørgrav.Sq 2 . 1213545d5ecaSDag-Erling SmørgravMultiple versions must be comma-separated. 1214545d5ecaSDag-Erling SmørgravThe default is 1215b15c8340SDag-Erling Smørgrav.Sq 2 . 1216f388f5efSDag-Erling SmørgravNote that the order of the protocol list does not indicate preference, 1217f388f5efSDag-Erling Smørgravbecause the client selects among multiple protocol versions offered 1218f388f5efSDag-Erling Smørgravby the server. 1219f388f5efSDag-Erling SmørgravSpecifying 1220f388f5efSDag-Erling Smørgrav.Dq 2,1 1221f388f5efSDag-Erling Smørgravis identical to 1222f388f5efSDag-Erling Smørgrav.Dq 1,2 . 1223*bc5531deSDag-Erling Smørgrav.It Cm PubkeyAcceptedKeyTypes 1224*bc5531deSDag-Erling SmørgravSpecifies the key types that will be accepted for public key authentication 1225*bc5531deSDag-Erling Smørgravas a comma-separated pattern list. 1226*bc5531deSDag-Erling SmørgravThe default 1227*bc5531deSDag-Erling Smørgrav.Dq * 1228*bc5531deSDag-Erling Smørgravwill allow all key types. 1229*bc5531deSDag-Erling SmørgravThe 1230*bc5531deSDag-Erling Smørgrav.Fl Q 1231*bc5531deSDag-Erling Smørgravoption of 1232*bc5531deSDag-Erling Smørgrav.Xr ssh 1 1233*bc5531deSDag-Erling Smørgravmay be used to list supported key types. 1234545d5ecaSDag-Erling Smørgrav.It Cm PubkeyAuthentication 1235545d5ecaSDag-Erling SmørgravSpecifies whether public key authentication is allowed. 1236545d5ecaSDag-Erling SmørgravThe default is 1237545d5ecaSDag-Erling Smørgrav.Dq yes . 1238545d5ecaSDag-Erling SmørgravNote that this option applies to protocol version 2 only. 1239e4a9863fSDag-Erling Smørgrav.It Cm RekeyLimit 1240e4a9863fSDag-Erling SmørgravSpecifies the maximum amount of data that may be transmitted before the 1241e4a9863fSDag-Erling Smørgravsession key is renegotiated, optionally followed a maximum amount of 1242e4a9863fSDag-Erling Smørgravtime that may pass before the session key is renegotiated. 1243e4a9863fSDag-Erling SmørgravThe first argument is specified in bytes and may have a suffix of 1244e4a9863fSDag-Erling Smørgrav.Sq K , 1245e4a9863fSDag-Erling Smørgrav.Sq M , 1246e4a9863fSDag-Erling Smørgravor 1247e4a9863fSDag-Erling Smørgrav.Sq G 1248e4a9863fSDag-Erling Smørgravto indicate Kilobytes, Megabytes, or Gigabytes, respectively. 1249e4a9863fSDag-Erling SmørgravThe default is between 1250e4a9863fSDag-Erling Smørgrav.Sq 1G 1251e4a9863fSDag-Erling Smørgravand 1252e4a9863fSDag-Erling Smørgrav.Sq 4G , 1253e4a9863fSDag-Erling Smørgravdepending on the cipher. 1254e4a9863fSDag-Erling SmørgravThe optional second value is specified in seconds and may use any of the 1255e4a9863fSDag-Erling Smørgravunits documented in the 1256e4a9863fSDag-Erling Smørgrav.Sx TIME FORMATS 1257e4a9863fSDag-Erling Smørgravsection. 1258e4a9863fSDag-Erling SmørgravThe default value for 1259e4a9863fSDag-Erling Smørgrav.Cm RekeyLimit 1260e4a9863fSDag-Erling Smørgravis 1261e4a9863fSDag-Erling Smørgrav.Dq default none , 1262e4a9863fSDag-Erling Smørgravwhich means that rekeying is performed after the cipher's default amount 1263e4a9863fSDag-Erling Smørgravof data has been sent or received and no time based rekeying is done. 1264e4a9863fSDag-Erling SmørgravThis option applies to protocol version 2 only. 1265b15c8340SDag-Erling Smørgrav.It Cm RevokedKeys 12666888a9beSDag-Erling SmørgravSpecifies revoked public keys. 1267b15c8340SDag-Erling SmørgravKeys listed in this file will be refused for public key authentication. 1268b15c8340SDag-Erling SmørgravNote that if this file is not readable, then public key authentication will 1269b15c8340SDag-Erling Smørgravbe refused for all users. 12706888a9beSDag-Erling SmørgravKeys may be specified as a text file, listing one public key per line, or as 12716888a9beSDag-Erling Smørgravan OpenSSH Key Revocation List (KRL) as generated by 12726888a9beSDag-Erling Smørgrav.Xr ssh-keygen 1 . 1273e4a9863fSDag-Erling SmørgravFor more information on KRLs, see the KEY REVOCATION LISTS section in 12746888a9beSDag-Erling Smørgrav.Xr ssh-keygen 1 . 1275545d5ecaSDag-Erling Smørgrav.It Cm RhostsRSAAuthentication 127635d4ccfbSDag-Erling SmørgravSpecifies whether rhosts or 127735d4ccfbSDag-Erling Smørgrav.Pa /etc/hosts.equiv 127835d4ccfbSDag-Erling Smørgravauthentication together 1279545d5ecaSDag-Erling Smørgravwith successful RSA host authentication is allowed. 1280545d5ecaSDag-Erling SmørgravThe default is 1281545d5ecaSDag-Erling Smørgrav.Dq no . 1282545d5ecaSDag-Erling SmørgravThis option applies to protocol version 1 only. 1283545d5ecaSDag-Erling Smørgrav.It Cm RSAAuthentication 1284545d5ecaSDag-Erling SmørgravSpecifies whether pure RSA authentication is allowed. 1285545d5ecaSDag-Erling SmørgravThe default is 1286545d5ecaSDag-Erling Smørgrav.Dq yes . 1287545d5ecaSDag-Erling SmørgravThis option applies to protocol version 1 only. 1288545d5ecaSDag-Erling Smørgrav.It Cm ServerKeyBits 1289545d5ecaSDag-Erling SmørgravDefines the number of bits in the ephemeral protocol version 1 server key. 1290d4af9e69SDag-Erling SmørgravThe minimum value is 512, and the default is 1024. 1291a0ee8cc6SDag-Erling Smørgrav.It Cm StreamLocalBindMask 1292a0ee8cc6SDag-Erling SmørgravSets the octal file creation mode mask 1293a0ee8cc6SDag-Erling Smørgrav.Pq umask 1294a0ee8cc6SDag-Erling Smørgravused when creating a Unix-domain socket file for local or remote 1295a0ee8cc6SDag-Erling Smørgravport forwarding. 1296a0ee8cc6SDag-Erling SmørgravThis option is only used for port forwarding to a Unix-domain socket file. 1297a0ee8cc6SDag-Erling Smørgrav.Pp 1298a0ee8cc6SDag-Erling SmørgravThe default value is 0177, which creates a Unix-domain socket file that is 1299a0ee8cc6SDag-Erling Smørgravreadable and writable only by the owner. 1300a0ee8cc6SDag-Erling SmørgravNote that not all operating systems honor the file mode on Unix-domain 1301a0ee8cc6SDag-Erling Smørgravsocket files. 1302a0ee8cc6SDag-Erling Smørgrav.It Cm StreamLocalBindUnlink 1303a0ee8cc6SDag-Erling SmørgravSpecifies whether to remove an existing Unix-domain socket file for local 1304a0ee8cc6SDag-Erling Smørgravor remote port forwarding before creating a new one. 1305a0ee8cc6SDag-Erling SmørgravIf the socket file already exists and 1306a0ee8cc6SDag-Erling Smørgrav.Cm StreamLocalBindUnlink 1307a0ee8cc6SDag-Erling Smørgravis not enabled, 1308a0ee8cc6SDag-Erling Smørgrav.Nm sshd 1309a0ee8cc6SDag-Erling Smørgravwill be unable to forward the port to the Unix-domain socket file. 1310a0ee8cc6SDag-Erling SmørgravThis option is only used for port forwarding to a Unix-domain socket file. 1311a0ee8cc6SDag-Erling Smørgrav.Pp 1312a0ee8cc6SDag-Erling SmørgravThe argument must be 1313a0ee8cc6SDag-Erling Smørgrav.Dq yes 1314a0ee8cc6SDag-Erling Smørgravor 1315a0ee8cc6SDag-Erling Smørgrav.Dq no . 1316a0ee8cc6SDag-Erling SmørgravThe default is 1317a0ee8cc6SDag-Erling Smørgrav.Dq no . 1318545d5ecaSDag-Erling Smørgrav.It Cm StrictModes 1319545d5ecaSDag-Erling SmørgravSpecifies whether 1320333ee039SDag-Erling Smørgrav.Xr sshd 8 1321545d5ecaSDag-Erling Smørgravshould check file modes and ownership of the 1322545d5ecaSDag-Erling Smørgravuser's files and home directory before accepting login. 1323545d5ecaSDag-Erling SmørgravThis is normally desirable because novices sometimes accidentally leave their 1324545d5ecaSDag-Erling Smørgravdirectory or files world-writable. 1325545d5ecaSDag-Erling SmørgravThe default is 1326545d5ecaSDag-Erling Smørgrav.Dq yes . 1327b15c8340SDag-Erling SmørgravNote that this does not apply to 1328b15c8340SDag-Erling Smørgrav.Cm ChrootDirectory , 1329b15c8340SDag-Erling Smørgravwhose permissions and ownership are checked unconditionally. 1330545d5ecaSDag-Erling Smørgrav.It Cm Subsystem 1331333ee039SDag-Erling SmørgravConfigures an external subsystem (e.g. file transfer daemon). 1332333ee039SDag-Erling SmørgravArguments should be a subsystem name and a command (with optional arguments) 1333333ee039SDag-Erling Smørgravto execute upon subsystem request. 1334d4af9e69SDag-Erling Smørgrav.Pp 1335545d5ecaSDag-Erling SmørgravThe command 1336545d5ecaSDag-Erling Smørgrav.Xr sftp-server 8 1337545d5ecaSDag-Erling Smørgravimplements the 1338545d5ecaSDag-Erling Smørgrav.Dq sftp 1339545d5ecaSDag-Erling Smørgravfile transfer subsystem. 1340d4af9e69SDag-Erling Smørgrav.Pp 1341d4af9e69SDag-Erling SmørgravAlternately the name 1342d4af9e69SDag-Erling Smørgrav.Dq internal-sftp 1343d4af9e69SDag-Erling Smørgravimplements an in-process 1344d4af9e69SDag-Erling Smørgrav.Dq sftp 1345d4af9e69SDag-Erling Smørgravserver. 1346d4af9e69SDag-Erling SmørgravThis may simplify configurations using 1347d4af9e69SDag-Erling Smørgrav.Cm ChrootDirectory 1348d4af9e69SDag-Erling Smørgravto force a different filesystem root on clients. 1349d4af9e69SDag-Erling Smørgrav.Pp 1350545d5ecaSDag-Erling SmørgravBy default no subsystems are defined. 1351545d5ecaSDag-Erling SmørgravNote that this option applies to protocol version 2 only. 1352545d5ecaSDag-Erling Smørgrav.It Cm SyslogFacility 1353545d5ecaSDag-Erling SmørgravGives the facility code that is used when logging messages from 1354333ee039SDag-Erling Smørgrav.Xr sshd 8 . 1355545d5ecaSDag-Erling SmørgravThe possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 1356545d5ecaSDag-Erling SmørgravLOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 1357545d5ecaSDag-Erling SmørgravThe default is AUTH. 13581ec0d754SDag-Erling Smørgrav.It Cm TCPKeepAlive 13591ec0d754SDag-Erling SmørgravSpecifies whether the system should send TCP keepalive messages to the 13601ec0d754SDag-Erling Smørgravother side. 13611ec0d754SDag-Erling SmørgravIf they are sent, death of the connection or crash of one 13621ec0d754SDag-Erling Smørgravof the machines will be properly noticed. 13631ec0d754SDag-Erling SmørgravHowever, this means that 13641ec0d754SDag-Erling Smørgravconnections will die if the route is down temporarily, and some people 13651ec0d754SDag-Erling Smørgravfind it annoying. 13661ec0d754SDag-Erling SmørgravOn the other hand, if TCP keepalives are not sent, 13671ec0d754SDag-Erling Smørgravsessions may hang indefinitely on the server, leaving 13681ec0d754SDag-Erling Smørgrav.Dq ghost 13691ec0d754SDag-Erling Smørgravusers and consuming server resources. 13701ec0d754SDag-Erling Smørgrav.Pp 13711ec0d754SDag-Erling SmørgravThe default is 13721ec0d754SDag-Erling Smørgrav.Dq yes 13731ec0d754SDag-Erling Smørgrav(to send TCP keepalive messages), and the server will notice 13741ec0d754SDag-Erling Smørgravif the network goes down or the client host crashes. 13751ec0d754SDag-Erling SmørgravThis avoids infinitely hanging sessions. 13761ec0d754SDag-Erling Smørgrav.Pp 13771ec0d754SDag-Erling SmørgravTo disable TCP keepalive messages, the value should be set to 13781ec0d754SDag-Erling Smørgrav.Dq no . 1379b15c8340SDag-Erling Smørgrav.It Cm TrustedUserCAKeys 1380b15c8340SDag-Erling SmørgravSpecifies a file containing public keys of certificate authorities that are 1381b15c8340SDag-Erling Smørgravtrusted to sign user certificates for authentication. 1382b15c8340SDag-Erling SmørgravKeys are listed one per line; empty lines and comments starting with 1383b15c8340SDag-Erling Smørgrav.Ql # 1384b15c8340SDag-Erling Smørgravare allowed. 1385b15c8340SDag-Erling SmørgravIf a certificate is presented for authentication and has its signing CA key 1386b15c8340SDag-Erling Smørgravlisted in this file, then it may be used for authentication for any user 1387b15c8340SDag-Erling Smørgravlisted in the certificate's principals list. 1388b15c8340SDag-Erling SmørgravNote that certificates that lack a list of principals will not be permitted 1389b15c8340SDag-Erling Smørgravfor authentication using 1390b15c8340SDag-Erling Smørgrav.Cm TrustedUserCAKeys . 1391e4a9863fSDag-Erling SmørgravFor more details on certificates, see the CERTIFICATES section in 1392b15c8340SDag-Erling Smørgrav.Xr ssh-keygen 1 . 1393cf2b5f3bSDag-Erling Smørgrav.It Cm UseDNS 1394cf2b5f3bSDag-Erling SmørgravSpecifies whether 1395333ee039SDag-Erling Smørgrav.Xr sshd 8 1396cf2b5f3bSDag-Erling Smørgravshould look up the remote host name and check that 1397cf2b5f3bSDag-Erling Smørgravthe resolved host name for the remote IP address maps back to the 1398cf2b5f3bSDag-Erling Smørgravvery same IP address. 1399cf2b5f3bSDag-Erling SmørgravThe default is 1400*bc5531deSDag-Erling Smørgrav.Dq no . 1401545d5ecaSDag-Erling Smørgrav.It Cm UseLogin 1402545d5ecaSDag-Erling SmørgravSpecifies whether 1403545d5ecaSDag-Erling Smørgrav.Xr login 1 1404545d5ecaSDag-Erling Smørgravis used for interactive login sessions. 1405545d5ecaSDag-Erling SmørgravThe default is 1406545d5ecaSDag-Erling Smørgrav.Dq no . 1407545d5ecaSDag-Erling SmørgravNote that 1408545d5ecaSDag-Erling Smørgrav.Xr login 1 1409545d5ecaSDag-Erling Smørgravis never used for remote command execution. 1410545d5ecaSDag-Erling SmørgravNote also, that if this is enabled, 1411545d5ecaSDag-Erling Smørgrav.Cm X11Forwarding 1412545d5ecaSDag-Erling Smørgravwill be disabled because 1413545d5ecaSDag-Erling Smørgrav.Xr login 1 1414545d5ecaSDag-Erling Smørgravdoes not know how to handle 1415545d5ecaSDag-Erling Smørgrav.Xr xauth 1 1416e73e9afaSDag-Erling Smørgravcookies. 1417e73e9afaSDag-Erling SmørgravIf 1418545d5ecaSDag-Erling Smørgrav.Cm UsePrivilegeSeparation 1419545d5ecaSDag-Erling Smørgravis specified, it will be disabled after authentication. 1420cf2b5f3bSDag-Erling Smørgrav.It Cm UsePAM 142121e764dfSDag-Erling SmørgravEnables the Pluggable Authentication Module interface. 142221e764dfSDag-Erling SmørgravIf set to 142321e764dfSDag-Erling Smørgrav.Dq yes 142421e764dfSDag-Erling Smørgravthis will enable PAM authentication using 142521e764dfSDag-Erling Smørgrav.Cm ChallengeResponseAuthentication 1426333ee039SDag-Erling Smørgravand 1427333ee039SDag-Erling Smørgrav.Cm PasswordAuthentication 1428333ee039SDag-Erling Smørgravin addition to PAM account and session module processing for all 1429333ee039SDag-Erling Smørgravauthentication types. 143021e764dfSDag-Erling Smørgrav.Pp 143121e764dfSDag-Erling SmørgravBecause PAM challenge-response authentication usually serves an equivalent 143221e764dfSDag-Erling Smørgravrole to password authentication, you should disable either 143321e764dfSDag-Erling Smørgrav.Cm PasswordAuthentication 143421e764dfSDag-Erling Smørgravor 143521e764dfSDag-Erling Smørgrav.Cm ChallengeResponseAuthentication. 143621e764dfSDag-Erling Smørgrav.Pp 143721e764dfSDag-Erling SmørgravIf 143821e764dfSDag-Erling Smørgrav.Cm UsePAM 143921e764dfSDag-Erling Smørgravis enabled, you will not be able to run 144021e764dfSDag-Erling Smørgrav.Xr sshd 8 144121e764dfSDag-Erling Smørgravas a non-root user. 144221e764dfSDag-Erling SmørgravThe default is 1443d2b1b4f3SDag-Erling Smørgrav.Dq yes . 1444545d5ecaSDag-Erling Smørgrav.It Cm UsePrivilegeSeparation 1445545d5ecaSDag-Erling SmørgravSpecifies whether 1446333ee039SDag-Erling Smørgrav.Xr sshd 8 1447545d5ecaSDag-Erling Smørgravseparates privileges by creating an unprivileged child process 1448e73e9afaSDag-Erling Smørgravto deal with incoming network traffic. 1449e73e9afaSDag-Erling SmørgravAfter successful authentication, another process will be created that has 1450e73e9afaSDag-Erling Smørgravthe privilege of the authenticated user. 1451e73e9afaSDag-Erling SmørgravThe goal of privilege separation is to prevent privilege 1452545d5ecaSDag-Erling Smørgravescalation by containing any corruption within the unprivileged processes. 1453545d5ecaSDag-Erling SmørgravThe default is 14542b1970f3SDag-Erling Smørgrav.Dq sandbox . 1455e146993eSDag-Erling SmørgravIf 1456e146993eSDag-Erling Smørgrav.Cm UsePrivilegeSeparation 1457e146993eSDag-Erling Smørgravis set to 1458e146993eSDag-Erling Smørgrav.Dq sandbox 1459e146993eSDag-Erling Smørgravthen the pre-authentication unprivileged process is subject to additional 1460e146993eSDag-Erling Smørgravrestrictions. 146135d4ccfbSDag-Erling Smørgrav.It Cm VersionAddendum 1462462c32cbSDag-Erling SmørgravOptionally specifies additional text to append to the SSH protocol banner 1463462c32cbSDag-Erling Smørgravsent by the server upon connection. 1464ee8aeb14SDag-Erling SmørgravThe default is 146560c59fadSDag-Erling Smørgrav.Dq FreeBSD-20160119 . 14666e571081SBryan DreweryThe value 14676e571081SBryan Drewery.Dq none 14686e571081SBryan Drewerymay be used to disable this. 1469545d5ecaSDag-Erling Smørgrav.It Cm X11DisplayOffset 1470545d5ecaSDag-Erling SmørgravSpecifies the first display number available for 1471333ee039SDag-Erling Smørgrav.Xr sshd 8 Ns 's 1472545d5ecaSDag-Erling SmørgravX11 forwarding. 1473333ee039SDag-Erling SmørgravThis prevents sshd from interfering with real X11 servers. 1474545d5ecaSDag-Erling SmørgravThe default is 10. 1475545d5ecaSDag-Erling Smørgrav.It Cm X11Forwarding 1476545d5ecaSDag-Erling SmørgravSpecifies whether X11 forwarding is permitted. 1477f388f5efSDag-Erling SmørgravThe argument must be 1478f388f5efSDag-Erling Smørgrav.Dq yes 1479f388f5efSDag-Erling Smørgravor 1480f388f5efSDag-Erling Smørgrav.Dq no . 1481545d5ecaSDag-Erling SmørgravThe default is 1482ee8aeb14SDag-Erling Smørgrav.Dq yes . 1483f388f5efSDag-Erling Smørgrav.Pp 1484f388f5efSDag-Erling SmørgravWhen X11 forwarding is enabled, there may be additional exposure to 1485f388f5efSDag-Erling Smørgravthe server and to client displays if the 1486333ee039SDag-Erling Smørgrav.Xr sshd 8 1487f388f5efSDag-Erling Smørgravproxy display is configured to listen on the wildcard address (see 1488f388f5efSDag-Erling Smørgrav.Cm X11UseLocalhost 1489333ee039SDag-Erling Smørgravbelow), though this is not the default. 1490f388f5efSDag-Erling SmørgravAdditionally, the authentication spoofing and authentication data 1491f388f5efSDag-Erling Smørgravverification and substitution occur on the client side. 1492f388f5efSDag-Erling SmørgravThe security risk of using X11 forwarding is that the client's X11 1493333ee039SDag-Erling Smørgravdisplay server may be exposed to attack when the SSH client requests 1494f388f5efSDag-Erling Smørgravforwarding (see the warnings for 1495f388f5efSDag-Erling Smørgrav.Cm ForwardX11 1496f388f5efSDag-Erling Smørgravin 1497f388f5efSDag-Erling Smørgrav.Xr ssh_config 5 ) . 1498f388f5efSDag-Erling SmørgravA system administrator may have a stance in which they want to 1499f388f5efSDag-Erling Smørgravprotect clients that may expose themselves to attack by unwittingly 1500f388f5efSDag-Erling Smørgravrequesting X11 forwarding, which can warrant a 1501f388f5efSDag-Erling Smørgrav.Dq no 1502f388f5efSDag-Erling Smørgravsetting. 1503f388f5efSDag-Erling Smørgrav.Pp 1504f388f5efSDag-Erling SmørgravNote that disabling X11 forwarding does not prevent users from 1505f388f5efSDag-Erling Smørgravforwarding X11 traffic, as users can always install their own forwarders. 1506545d5ecaSDag-Erling SmørgravX11 forwarding is automatically disabled if 1507545d5ecaSDag-Erling Smørgrav.Cm UseLogin 1508545d5ecaSDag-Erling Smørgravis enabled. 1509545d5ecaSDag-Erling Smørgrav.It Cm X11UseLocalhost 1510545d5ecaSDag-Erling SmørgravSpecifies whether 1511333ee039SDag-Erling Smørgrav.Xr sshd 8 1512545d5ecaSDag-Erling Smørgravshould bind the X11 forwarding server to the loopback address or to 1513e73e9afaSDag-Erling Smørgravthe wildcard address. 1514e73e9afaSDag-Erling SmørgravBy default, 1515333ee039SDag-Erling Smørgravsshd binds the forwarding server to the loopback address and sets the 1516545d5ecaSDag-Erling Smørgravhostname part of the 1517545d5ecaSDag-Erling Smørgrav.Ev DISPLAY 1518545d5ecaSDag-Erling Smørgravenvironment variable to 1519545d5ecaSDag-Erling Smørgrav.Dq localhost . 1520f388f5efSDag-Erling SmørgravThis prevents remote hosts from connecting to the proxy display. 1521545d5ecaSDag-Erling SmørgravHowever, some older X11 clients may not function with this 1522545d5ecaSDag-Erling Smørgravconfiguration. 1523545d5ecaSDag-Erling Smørgrav.Cm X11UseLocalhost 1524545d5ecaSDag-Erling Smørgravmay be set to 1525545d5ecaSDag-Erling Smørgrav.Dq no 1526545d5ecaSDag-Erling Smørgravto specify that the forwarding server should be bound to the wildcard 1527545d5ecaSDag-Erling Smørgravaddress. 1528545d5ecaSDag-Erling SmørgravThe argument must be 1529545d5ecaSDag-Erling Smørgrav.Dq yes 1530545d5ecaSDag-Erling Smørgravor 1531545d5ecaSDag-Erling Smørgrav.Dq no . 1532545d5ecaSDag-Erling SmørgravThe default is 1533545d5ecaSDag-Erling Smørgrav.Dq yes . 1534545d5ecaSDag-Erling Smørgrav.It Cm XAuthLocation 1535f388f5efSDag-Erling SmørgravSpecifies the full pathname of the 1536545d5ecaSDag-Erling Smørgrav.Xr xauth 1 1537545d5ecaSDag-Erling Smørgravprogram. 1538545d5ecaSDag-Erling SmørgravThe default is 1539ffea3f5aSDag-Erling Smørgrav.Pa /usr/local/bin/xauth . 1540545d5ecaSDag-Erling Smørgrav.El 1541333ee039SDag-Erling Smørgrav.Sh TIME FORMATS 1542333ee039SDag-Erling Smørgrav.Xr sshd 8 1543545d5ecaSDag-Erling Smørgravcommand-line arguments and configuration file options that specify time 1544545d5ecaSDag-Erling Smørgravmay be expressed using a sequence of the form: 1545545d5ecaSDag-Erling Smørgrav.Sm off 1546f388f5efSDag-Erling Smørgrav.Ar time Op Ar qualifier , 1547545d5ecaSDag-Erling Smørgrav.Sm on 1548545d5ecaSDag-Erling Smørgravwhere 1549545d5ecaSDag-Erling Smørgrav.Ar time 1550545d5ecaSDag-Erling Smørgravis a positive integer value and 1551545d5ecaSDag-Erling Smørgrav.Ar qualifier 1552545d5ecaSDag-Erling Smørgravis one of the following: 1553545d5ecaSDag-Erling Smørgrav.Pp 1554545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds -compact -offset indent 1555333ee039SDag-Erling Smørgrav.It Aq Cm none 1556545d5ecaSDag-Erling Smørgravseconds 1557545d5ecaSDag-Erling Smørgrav.It Cm s | Cm S 1558545d5ecaSDag-Erling Smørgravseconds 1559545d5ecaSDag-Erling Smørgrav.It Cm m | Cm M 1560545d5ecaSDag-Erling Smørgravminutes 1561545d5ecaSDag-Erling Smørgrav.It Cm h | Cm H 1562545d5ecaSDag-Erling Smørgravhours 1563545d5ecaSDag-Erling Smørgrav.It Cm d | Cm D 1564545d5ecaSDag-Erling Smørgravdays 1565545d5ecaSDag-Erling Smørgrav.It Cm w | Cm W 1566545d5ecaSDag-Erling Smørgravweeks 1567545d5ecaSDag-Erling Smørgrav.El 1568545d5ecaSDag-Erling Smørgrav.Pp 1569545d5ecaSDag-Erling SmørgravEach member of the sequence is added together to calculate 1570545d5ecaSDag-Erling Smørgravthe total time value. 1571545d5ecaSDag-Erling Smørgrav.Pp 1572545d5ecaSDag-Erling SmørgravTime format examples: 1573545d5ecaSDag-Erling Smørgrav.Pp 1574545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds -compact -offset indent 1575545d5ecaSDag-Erling Smørgrav.It 600 1576545d5ecaSDag-Erling Smørgrav600 seconds (10 minutes) 1577545d5ecaSDag-Erling Smørgrav.It 10m 1578545d5ecaSDag-Erling Smørgrav10 minutes 1579545d5ecaSDag-Erling Smørgrav.It 1h30m 1580545d5ecaSDag-Erling Smørgrav1 hour 30 minutes (90 minutes) 1581545d5ecaSDag-Erling Smørgrav.El 1582545d5ecaSDag-Erling Smørgrav.Sh FILES 1583545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds 1584545d5ecaSDag-Erling Smørgrav.It Pa /etc/ssh/sshd_config 1585545d5ecaSDag-Erling SmørgravContains configuration data for 1586333ee039SDag-Erling Smørgrav.Xr sshd 8 . 1587545d5ecaSDag-Erling SmørgravThis file should be writable by root only, but it is recommended 1588545d5ecaSDag-Erling Smørgrav(though not necessary) that it be world-readable. 1589545d5ecaSDag-Erling Smørgrav.El 1590cf2b5f3bSDag-Erling Smørgrav.Sh SEE ALSO 1591cf2b5f3bSDag-Erling Smørgrav.Xr sshd 8 1592545d5ecaSDag-Erling Smørgrav.Sh AUTHORS 1593545d5ecaSDag-Erling SmørgravOpenSSH is a derivative of the original and free 1594545d5ecaSDag-Erling Smørgravssh 1.2.12 release by Tatu Ylonen. 1595545d5ecaSDag-Erling SmørgravAaron Campbell, Bob Beck, Markus Friedl, Niels Provos, 1596545d5ecaSDag-Erling SmørgravTheo de Raadt and Dug Song 1597545d5ecaSDag-Erling Smørgravremoved many bugs, re-added newer features and 1598545d5ecaSDag-Erling Smørgravcreated OpenSSH. 1599545d5ecaSDag-Erling SmørgravMarkus Friedl contributed the support for SSH 1600545d5ecaSDag-Erling Smørgravprotocol versions 1.5 and 2.0. 1601545d5ecaSDag-Erling SmørgravNiels Provos and Markus Friedl contributed support 1602545d5ecaSDag-Erling Smørgravfor privilege separation. 1603