Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1 | .\" |
| 2 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> |
| 3 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
| 4 | .\" All rights reserved |
| 5 | .\" |
| 6 | .\" As far as I am concerned, the code I have written for this software |
| 7 | .\" can be used freely for any purpose. Any derived versions of this |
| 8 | .\" software must be clearly marked as such, and if the derived work is |
| 9 | .\" incompatible with the protocol description in the RFC file, it must be |
| 10 | .\" called by a name other than "ssh" or "Secure Shell". |
| 11 | .\" |
| 12 | .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. |
| 13 | .\" Copyright (c) 1999 Aaron Campbell. All rights reserved. |
| 14 | .\" Copyright (c) 1999 Theo de Raadt. All rights reserved. |
| 15 | .\" |
| 16 | .\" Redistribution and use in source and binary forms, with or without |
| 17 | .\" modification, are permitted provided that the following conditions |
| 18 | .\" are met: |
| 19 | .\" 1. Redistributions of source code must retain the above copyright |
| 20 | .\" notice, this list of conditions and the following disclaimer. |
| 21 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 22 | .\" notice, this list of conditions and the following disclaimer in the |
| 23 | .\" documentation and/or other materials provided with the distribution. |
| 24 | .\" |
| 25 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 26 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 27 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 28 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 29 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 30 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 31 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 32 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 35 | .\" |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame^] | 36 | .\" $OpenBSD: sshd_config.5,v 1.147 2012/10/31 08:04:50 jmc Exp $ |
| 37 | .Dd $Mdocdate: October 31 2012 $ |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 38 | .Dt SSHD_CONFIG 5 |
| 39 | .Os |
| 40 | .Sh NAME |
| 41 | .Nm sshd_config |
| 42 | .Nd OpenSSH SSH daemon configuration file |
| 43 | .Sh SYNOPSIS |
Damien Miller | d94fc72 | 2007-01-05 16:29:30 +1100 | [diff] [blame] | 44 | .Nm /etc/ssh/sshd_config |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 45 | .Sh DESCRIPTION |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 46 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 47 | reads configuration data from |
| 48 | .Pa /etc/ssh/sshd_config |
| 49 | (or the file specified with |
| 50 | .Fl f |
| 51 | on the command line). |
| 52 | The file contains keyword-argument pairs, one per line. |
| 53 | Lines starting with |
| 54 | .Ql # |
| 55 | and empty lines are interpreted as comments. |
Damien Miller | 306d118 | 2006-03-15 12:05:59 +1100 | [diff] [blame] | 56 | Arguments may optionally be enclosed in double quotes |
| 57 | .Pq \&" |
| 58 | in order to represent arguments containing spaces. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 59 | .Pp |
| 60 | The possible |
| 61 | keywords and their meanings are as follows (note that |
| 62 | keywords are case-insensitive and arguments are case-sensitive): |
| 63 | .Bl -tag -width Ds |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 64 | .It Cm AcceptEnv |
| 65 | Specifies what environment variables sent by the client will be copied into |
| 66 | the session's |
| 67 | .Xr environ 7 . |
| 68 | See |
| 69 | .Cm SendEnv |
| 70 | in |
| 71 | .Xr ssh_config 5 |
| 72 | for how to configure the client. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 73 | Note that environment passing is only supported for protocol 2. |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 74 | Variables are specified by name, which may contain the wildcard characters |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 75 | .Ql * |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 76 | and |
| 77 | .Ql \&? . |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 78 | Multiple environment variables may be separated by whitespace or spread |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 79 | across multiple |
| 80 | .Cm AcceptEnv |
| 81 | directives. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 82 | Be warned that some environment variables could be used to bypass restricted |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 83 | user environments. |
| 84 | For this reason, care should be taken in the use of this directive. |
| 85 | The default is not to accept any environment variables. |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 86 | .It Cm AddressFamily |
| 87 | Specifies which address family should be used by |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 88 | .Xr sshd 8 . |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 89 | Valid arguments are |
| 90 | .Dq any , |
| 91 | .Dq inet |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 92 | (use IPv4 only), or |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 93 | .Dq inet6 |
| 94 | (use IPv6 only). |
| 95 | The default is |
| 96 | .Dq any . |
Damien Miller | e989019 | 2008-05-19 14:59:02 +1000 | [diff] [blame] | 97 | .It Cm AllowAgentForwarding |
| 98 | Specifies whether |
| 99 | .Xr ssh-agent 1 |
| 100 | forwarding is permitted. |
| 101 | The default is |
| 102 | .Dq yes . |
| 103 | Note that disabling agent forwarding does not improve security |
| 104 | unless users are also denied shell access, as they can always install |
| 105 | their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 106 | .It Cm AllowGroups |
| 107 | This keyword can be followed by a list of group name patterns, separated |
| 108 | by spaces. |
| 109 | If specified, login is allowed only for users whose primary |
| 110 | group or supplementary group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 111 | Only group names are valid; a numerical group ID is not recognized. |
| 112 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 113 | The allow/deny directives are processed in the following order: |
| 114 | .Cm DenyUsers , |
| 115 | .Cm AllowUsers , |
| 116 | .Cm DenyGroups , |
| 117 | and finally |
| 118 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 119 | .Pp |
| 120 | See |
| 121 | .Sx PATTERNS |
| 122 | in |
| 123 | .Xr ssh_config 5 |
| 124 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 125 | .It Cm AllowTcpForwarding |
| 126 | Specifies whether TCP forwarding is permitted. |
| 127 | The default is |
| 128 | .Dq yes . |
| 129 | Note that disabling TCP forwarding does not improve security unless |
| 130 | users are also denied shell access, as they can always install their |
| 131 | own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 132 | .It Cm AllowUsers |
| 133 | This keyword can be followed by a list of user name patterns, separated |
| 134 | by spaces. |
Damien Miller | 5a93add | 2003-01-24 11:34:52 +1100 | [diff] [blame] | 135 | If specified, login is allowed only for user names that |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 136 | match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 137 | Only user names are valid; a numerical user ID is not recognized. |
| 138 | By default, login is allowed for all users. |
| 139 | If the pattern takes the form USER@HOST then USER and HOST |
| 140 | are separately checked, restricting logins to particular |
| 141 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 142 | The allow/deny directives are processed in the following order: |
| 143 | .Cm DenyUsers , |
| 144 | .Cm AllowUsers , |
| 145 | .Cm DenyGroups , |
| 146 | and finally |
| 147 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 148 | .Pp |
| 149 | See |
| 150 | .Sx PATTERNS |
| 151 | in |
| 152 | .Xr ssh_config 5 |
| 153 | for more information on patterns. |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 154 | .It Cm AuthorizedKeysCommand |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame^] | 155 | Specifies a program to be used to look up the user's public keys. |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 156 | The program will be invoked with a single argument of the username |
| 157 | being authenticated, and should produce on standard output zero or |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame^] | 158 | more lines of authorized_keys output (see |
| 159 | .Sx AUTHORIZED_KEYS |
| 160 | in |
| 161 | .Xr sshd 8 ) . |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 162 | If a key supplied by AuthorizedKeysCommand does not successfully authenticate |
| 163 | and authorize the user then public key authentication continues using the usual |
| 164 | .Cm AuthorizedKeysFile |
| 165 | files. |
| 166 | By default, no AuthorizedKeysCommand is run. |
| 167 | .It Cm AuthorizedKeysCommandUser |
| 168 | Specifies the user under whose account the AuthorizedKeysCommand is run. |
| 169 | The default is the user being authenticated. |
| 170 | It is recommended to use a dedicated user that has no other role on the host |
| 171 | than running authorized keys commands. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 172 | .It Cm AuthorizedKeysFile |
| 173 | Specifies the file that contains the public keys that can be used |
| 174 | for user authentication. |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 175 | The format is described in the |
| 176 | .Sx AUTHORIZED_KEYS FILE FORMAT |
| 177 | section of |
| 178 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 179 | .Cm AuthorizedKeysFile |
| 180 | may contain tokens of the form %T which are substituted during connection |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 181 | setup. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 182 | The following tokens are defined: %% is replaced by a literal '%', |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 183 | %h is replaced by the home directory of the user being authenticated, and |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 184 | %u is replaced by the username of that user. |
| 185 | After expansion, |
| 186 | .Cm AuthorizedKeysFile |
| 187 | is taken to be an absolute path or one relative to the user's home |
| 188 | directory. |
Damien Miller | b9132fc | 2011-05-29 21:41:40 +1000 | [diff] [blame] | 189 | Multiple files may be listed, separated by whitespace. |
| 190 | The default is |
| 191 | .Dq .ssh/authorized_keys .ssh/authorized_keys2 . |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 192 | .It Cm AuthorizedPrincipalsFile |
| 193 | Specifies a file that lists principal names that are accepted for |
| 194 | certificate authentication. |
| 195 | When using certificates signed by a key listed in |
| 196 | .Cm TrustedUserCAKeys , |
| 197 | this file lists names, one of which must appear in the certificate for it |
| 198 | to be accepted for authentication. |
Damien Miller | d59dab8 | 2010-07-02 13:37:17 +1000 | [diff] [blame] | 199 | Names are listed one per line preceded by key options (as described |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 200 | in |
| 201 | .Sx AUTHORIZED_KEYS FILE FORMAT |
| 202 | in |
Damien Miller | d59dab8 | 2010-07-02 13:37:17 +1000 | [diff] [blame] | 203 | .Xr sshd 8 ) . |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 204 | Empty lines and comments starting with |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 205 | .Ql # |
| 206 | are ignored. |
| 207 | .Pp |
| 208 | .Cm AuthorizedPrincipalsFile |
| 209 | may contain tokens of the form %T which are substituted during connection |
| 210 | setup. |
| 211 | The following tokens are defined: %% is replaced by a literal '%', |
| 212 | %h is replaced by the home directory of the user being authenticated, and |
| 213 | %u is replaced by the username of that user. |
| 214 | After expansion, |
| 215 | .Cm AuthorizedPrincipalsFile |
| 216 | is taken to be an absolute path or one relative to the user's home |
| 217 | directory. |
| 218 | .Pp |
Damien Miller | 8fef9eb | 2012-04-22 11:25:10 +1000 | [diff] [blame] | 219 | The default is |
| 220 | .Dq none , |
| 221 | i.e. not to use a principals file \(en in this case, the username |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 222 | of the user must appear in a certificate's principals list for it to be |
| 223 | accepted. |
| 224 | Note that |
| 225 | .Cm AuthorizedPrincipalsFile |
| 226 | is only used when authentication proceeds using a CA listed in |
| 227 | .Cm TrustedUserCAKeys |
| 228 | and is not consulted for certification authorities trusted via |
| 229 | .Pa ~/.ssh/authorized_keys , |
| 230 | though the |
| 231 | .Cm principals= |
| 232 | key option offers a similar facility (see |
| 233 | .Xr sshd 8 |
| 234 | for details). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 235 | .It Cm Banner |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 236 | The contents of the specified file are sent to the remote user before |
| 237 | authentication is allowed. |
Damien Miller | 4890e53 | 2007-09-17 11:57:38 +1000 | [diff] [blame] | 238 | If the argument is |
| 239 | .Dq none |
| 240 | then no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 241 | This option is only available for protocol version 2. |
| 242 | By default, no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 243 | .It Cm ChallengeResponseAuthentication |
Damien Miller | 9c7bf8d | 2009-08-28 10:27:08 +1000 | [diff] [blame] | 244 | Specifies whether challenge-response authentication is allowed (e.g. via |
| 245 | PAM or though authentication styles supported in |
| 246 | .Xr login.conf 5 ) |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 247 | The default is |
| 248 | .Dq yes . |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 249 | .It Cm ChrootDirectory |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 250 | Specifies the pathname of a directory to |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 251 | .Xr chroot 2 |
| 252 | to after authentication. |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 253 | All components of the pathname must be root-owned directories that are |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 254 | not writable by any other user or group. |
Darren Tucker | 51dbe50 | 2009-06-21 17:56:51 +1000 | [diff] [blame] | 255 | After the chroot, |
| 256 | .Xr sshd 8 |
| 257 | changes the working directory to the user's home directory. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 258 | .Pp |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 259 | The pathname may contain the following tokens that are expanded at runtime once |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 260 | the connecting user has been authenticated: %% is replaced by a literal '%', |
| 261 | %h is replaced by the home directory of the user being authenticated, and |
| 262 | %u is replaced by the username of that user. |
| 263 | .Pp |
| 264 | The |
| 265 | .Cm ChrootDirectory |
| 266 | must contain the necessary files and directories to support the |
Darren Tucker | af501cf | 2009-06-21 17:53:04 +1000 | [diff] [blame] | 267 | user's session. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 268 | For an interactive session this requires at least a shell, typically |
| 269 | .Xr sh 1 , |
| 270 | and basic |
| 271 | .Pa /dev |
| 272 | nodes such as |
| 273 | .Xr null 4 , |
| 274 | .Xr zero 4 , |
| 275 | .Xr stdin 4 , |
| 276 | .Xr stdout 4 , |
| 277 | .Xr stderr 4 , |
| 278 | .Xr arandom 4 |
| 279 | and |
| 280 | .Xr tty 4 |
| 281 | devices. |
| 282 | For file transfer sessions using |
Darren Tucker | f92077f | 2009-06-21 17:56:25 +1000 | [diff] [blame] | 283 | .Dq sftp , |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 284 | no additional configuration of the environment is necessary if the |
Darren Tucker | f92077f | 2009-06-21 17:56:25 +1000 | [diff] [blame] | 285 | in-process sftp server is used, |
| 286 | though sessions which use logging do require |
Darren Tucker | 00fcd71 | 2009-06-21 17:56:00 +1000 | [diff] [blame] | 287 | .Pa /dev/log |
| 288 | inside the chroot directory (see |
| 289 | .Xr sftp-server 8 |
| 290 | for details). |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 291 | .Pp |
| 292 | The default is not to |
| 293 | .Xr chroot 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 294 | .It Cm Ciphers |
| 295 | Specifies the ciphers allowed for protocol version 2. |
| 296 | Multiple ciphers must be comma-separated. |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 297 | The supported ciphers are |
| 298 | .Dq 3des-cbc , |
| 299 | .Dq aes128-cbc , |
| 300 | .Dq aes192-cbc , |
| 301 | .Dq aes256-cbc , |
| 302 | .Dq aes128-ctr , |
| 303 | .Dq aes192-ctr , |
| 304 | .Dq aes256-ctr , |
Damien Miller | 3710f27 | 2005-05-26 12:19:17 +1000 | [diff] [blame] | 305 | .Dq arcfour128 , |
| 306 | .Dq arcfour256 , |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 307 | .Dq arcfour , |
| 308 | .Dq blowfish-cbc , |
| 309 | and |
| 310 | .Dq cast128-cbc . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 311 | The default is: |
| 312 | .Bd -literal -offset 3n |
Damien Miller | 9aa72ba | 2009-01-28 16:34:00 +1100 | [diff] [blame] | 313 | aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128, |
| 314 | aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc, |
| 315 | aes256-cbc,arcfour |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 316 | .Ed |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 317 | .It Cm ClientAliveCountMax |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 318 | Sets the number of client alive messages (see below) which may be |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 319 | sent without |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 320 | .Xr sshd 8 |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 321 | receiving any messages back from the client. |
| 322 | If this threshold is reached while client alive messages are being sent, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 323 | sshd will disconnect the client, terminating the session. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 324 | It is important to note that the use of client alive messages is very |
| 325 | different from |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 326 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 327 | (below). |
| 328 | The client alive messages are sent through the encrypted channel |
| 329 | and therefore will not be spoofable. |
| 330 | The TCP keepalive option enabled by |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 331 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 332 | is spoofable. |
| 333 | The client alive mechanism is valuable when the client or |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 334 | server depend on knowing when a connection has become inactive. |
| 335 | .Pp |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 336 | The default value is 3. |
| 337 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 338 | .Cm ClientAliveInterval |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 339 | (see below) is set to 15, and |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 340 | .Cm ClientAliveCountMax |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 341 | is left at the default, unresponsive SSH clients |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 342 | will be disconnected after approximately 45 seconds. |
Damien Miller | cc3e8ba | 2006-03-15 12:06:55 +1100 | [diff] [blame] | 343 | This option applies to protocol version 2 only. |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 344 | .It Cm ClientAliveInterval |
| 345 | Sets a timeout interval in seconds after which if no data has been received |
| 346 | from the client, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 347 | .Xr sshd 8 |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 348 | will send a message through the encrypted |
| 349 | channel to request a response from the client. |
| 350 | The default |
| 351 | is 0, indicating that these messages will not be sent to the client. |
| 352 | This option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 353 | .It Cm Compression |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 354 | Specifies whether compression is allowed, or delayed until |
| 355 | the user has authenticated successfully. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 356 | The argument must be |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 357 | .Dq yes , |
| 358 | .Dq delayed , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 359 | or |
| 360 | .Dq no . |
| 361 | The default is |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 362 | .Dq delayed . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 363 | .It Cm DenyGroups |
| 364 | This keyword can be followed by a list of group name patterns, separated |
| 365 | by spaces. |
| 366 | Login is disallowed for users whose primary group or supplementary |
| 367 | group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 368 | Only group names are valid; a numerical group ID is not recognized. |
| 369 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 370 | The allow/deny directives are processed in the following order: |
| 371 | .Cm DenyUsers , |
| 372 | .Cm AllowUsers , |
| 373 | .Cm DenyGroups , |
| 374 | and finally |
| 375 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 376 | .Pp |
| 377 | See |
| 378 | .Sx PATTERNS |
| 379 | in |
| 380 | .Xr ssh_config 5 |
| 381 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 382 | .It Cm DenyUsers |
| 383 | This keyword can be followed by a list of user name patterns, separated |
| 384 | by spaces. |
| 385 | Login is disallowed for user names that match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 386 | Only user names are valid; a numerical user ID is not recognized. |
| 387 | By default, login is allowed for all users. |
| 388 | If the pattern takes the form USER@HOST then USER and HOST |
| 389 | are separately checked, restricting logins to particular |
| 390 | users from particular hosts. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 391 | The allow/deny directives are processed in the following order: |
| 392 | .Cm DenyUsers , |
| 393 | .Cm AllowUsers , |
| 394 | .Cm DenyGroups , |
| 395 | and finally |
| 396 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 397 | .Pp |
| 398 | See |
| 399 | .Sx PATTERNS |
| 400 | in |
| 401 | .Xr ssh_config 5 |
| 402 | for more information on patterns. |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 403 | .It Cm ForceCommand |
| 404 | Forces the execution of the command specified by |
| 405 | .Cm ForceCommand , |
Damien Miller | a1b48cc | 2008-03-27 11:02:02 +1100 | [diff] [blame] | 406 | ignoring any command supplied by the client and |
| 407 | .Pa ~/.ssh/rc |
| 408 | if present. |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 409 | The command is invoked by using the user's login shell with the -c option. |
| 410 | This applies to shell, command, or subsystem execution. |
| 411 | It is most useful inside a |
| 412 | .Cm Match |
| 413 | block. |
| 414 | The command originally supplied by the client is available in the |
| 415 | .Ev SSH_ORIGINAL_COMMAND |
| 416 | environment variable. |
Damien Miller | cdb6e65 | 2008-02-10 22:47:24 +1100 | [diff] [blame] | 417 | Specifying a command of |
| 418 | .Dq internal-sftp |
| 419 | will force the use of an in-process sftp server that requires no support |
| 420 | files when used with |
| 421 | .Cm ChrootDirectory . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 422 | .It Cm GatewayPorts |
| 423 | Specifies whether remote hosts are allowed to connect to ports |
| 424 | forwarded for the client. |
| 425 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 426 | .Xr sshd 8 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 427 | binds remote port forwardings to the loopback address. |
| 428 | This prevents other remote hosts from connecting to forwarded ports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 429 | .Cm GatewayPorts |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 430 | can be used to specify that sshd |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 431 | should allow remote port forwardings to bind to non-loopback addresses, thus |
| 432 | allowing other hosts to connect. |
| 433 | The argument may be |
| 434 | .Dq no |
| 435 | to force remote port forwardings to be available to the local host only, |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 436 | .Dq yes |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 437 | to force remote port forwardings to bind to the wildcard address, or |
| 438 | .Dq clientspecified |
| 439 | to allow the client to select the address to which the forwarding is bound. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 440 | The default is |
| 441 | .Dq no . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 442 | .It Cm GSSAPIAuthentication |
Damien Miller | 9b7b03b | 2003-09-02 22:57:05 +1000 | [diff] [blame] | 443 | Specifies whether user authentication based on GSSAPI is allowed. |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 444 | The default is |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 445 | .Dq no . |
| 446 | Note that this option applies to protocol version 2 only. |
| 447 | .It Cm GSSAPICleanupCredentials |
| 448 | Specifies whether to automatically destroy the user's credentials cache |
| 449 | on logout. |
| 450 | The default is |
| 451 | .Dq yes . |
| 452 | Note that this option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 453 | .It Cm HostbasedAuthentication |
| 454 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 455 | with successful public key client host authentication is allowed |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame] | 456 | (host-based authentication). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 457 | This option is similar to |
| 458 | .Cm RhostsRSAAuthentication |
| 459 | and applies to protocol version 2 only. |
| 460 | The default is |
| 461 | .Dq no . |
Damien Miller | b594f38 | 2006-08-30 11:06:34 +1000 | [diff] [blame] | 462 | .It Cm HostbasedUsesNameFromPacketOnly |
| 463 | Specifies whether or not the server will attempt to perform a reverse |
| 464 | name lookup when matching the name in the |
| 465 | .Pa ~/.shosts , |
| 466 | .Pa ~/.rhosts , |
| 467 | and |
| 468 | .Pa /etc/hosts.equiv |
| 469 | files during |
| 470 | .Cm HostbasedAuthentication . |
| 471 | A setting of |
| 472 | .Dq yes |
| 473 | means that |
| 474 | .Xr sshd 8 |
| 475 | uses the name supplied by the client rather than |
| 476 | attempting to resolve the name from the TCP connection itself. |
| 477 | The default is |
| 478 | .Dq no . |
Damien Miller | 0a80ca1 | 2010-02-27 07:55:05 +1100 | [diff] [blame] | 479 | .It Cm HostCertificate |
| 480 | Specifies a file containing a public host certificate. |
| 481 | The certificate's public key must match a private host key already specified |
| 482 | by |
| 483 | .Cm HostKey . |
| 484 | The default behaviour of |
| 485 | .Xr sshd 8 |
| 486 | is not to load any certificates. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 487 | .It Cm HostKey |
| 488 | Specifies a file containing a private host key |
| 489 | used by SSH. |
| 490 | The default is |
| 491 | .Pa /etc/ssh/ssh_host_key |
| 492 | for protocol version 1, and |
Damien Miller | eb8b60e | 2010-08-31 22:41:14 +1000 | [diff] [blame] | 493 | .Pa /etc/ssh/ssh_host_dsa_key , |
| 494 | .Pa /etc/ssh/ssh_host_ecdsa_key |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 495 | and |
Damien Miller | eb8b60e | 2010-08-31 22:41:14 +1000 | [diff] [blame] | 496 | .Pa /etc/ssh/ssh_host_rsa_key |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 497 | for protocol version 2. |
| 498 | Note that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 499 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 500 | will refuse to use a file if it is group/world-accessible. |
| 501 | It is possible to have multiple host key files. |
| 502 | .Dq rsa1 |
| 503 | keys are used for version 1 and |
Damien Miller | eb8b60e | 2010-08-31 22:41:14 +1000 | [diff] [blame] | 504 | .Dq dsa , |
| 505 | .Dq ecdsa |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 506 | or |
| 507 | .Dq rsa |
| 508 | are used for version 2 of the SSH protocol. |
| 509 | .It Cm IgnoreRhosts |
| 510 | Specifies that |
| 511 | .Pa .rhosts |
| 512 | and |
| 513 | .Pa .shosts |
| 514 | files will not be used in |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 515 | .Cm RhostsRSAAuthentication |
| 516 | or |
| 517 | .Cm HostbasedAuthentication . |
| 518 | .Pp |
| 519 | .Pa /etc/hosts.equiv |
| 520 | and |
| 521 | .Pa /etc/shosts.equiv |
| 522 | are still used. |
| 523 | The default is |
| 524 | .Dq yes . |
| 525 | .It Cm IgnoreUserKnownHosts |
| 526 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 527 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 528 | should ignore the user's |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 529 | .Pa ~/.ssh/known_hosts |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 530 | during |
| 531 | .Cm RhostsRSAAuthentication |
| 532 | or |
| 533 | .Cm HostbasedAuthentication . |
| 534 | The default is |
| 535 | .Dq no . |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 536 | .It Cm IPQoS |
| 537 | Specifies the IPv4 type-of-service or DSCP class for the connection. |
| 538 | Accepted values are |
| 539 | .Dq af11 , |
| 540 | .Dq af12 , |
| 541 | .Dq af13 , |
Damien Miller | f6e758c | 2011-09-22 21:37:13 +1000 | [diff] [blame] | 542 | .Dq af21 , |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 543 | .Dq af22 , |
| 544 | .Dq af23 , |
| 545 | .Dq af31 , |
| 546 | .Dq af32 , |
| 547 | .Dq af33 , |
| 548 | .Dq af41 , |
| 549 | .Dq af42 , |
| 550 | .Dq af43 , |
| 551 | .Dq cs0 , |
| 552 | .Dq cs1 , |
| 553 | .Dq cs2 , |
| 554 | .Dq cs3 , |
| 555 | .Dq cs4 , |
| 556 | .Dq cs5 , |
| 557 | .Dq cs6 , |
| 558 | .Dq cs7 , |
| 559 | .Dq ef , |
| 560 | .Dq lowdelay , |
| 561 | .Dq throughput , |
| 562 | .Dq reliability , |
| 563 | or a numeric value. |
Damien Miller | 928362d | 2010-12-26 14:26:45 +1100 | [diff] [blame] | 564 | This option may take one or two arguments, separated by whitespace. |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 565 | If one argument is specified, it is used as the packet class unconditionally. |
| 566 | If two values are specified, the first is automatically selected for |
| 567 | interactive sessions and the second for non-interactive sessions. |
| 568 | The default is |
| 569 | .Dq lowdelay |
| 570 | for interactive sessions and |
| 571 | .Dq throughput |
| 572 | for non-interactive sessions. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 573 | .It Cm KerberosAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 574 | Specifies whether the password provided by the user for |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 575 | .Cm PasswordAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 576 | will be validated through the Kerberos KDC. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 577 | To use this option, the server needs a |
| 578 | Kerberos servtab which allows the verification of the KDC's identity. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 579 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 580 | .Dq no . |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 581 | .It Cm KerberosGetAFSToken |
Darren Tucker | e2dd2d5 | 2005-10-03 18:19:06 +1000 | [diff] [blame] | 582 | If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 583 | an AFS token before accessing the user's home directory. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 584 | The default is |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 585 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 586 | .It Cm KerberosOrLocalPasswd |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 587 | If password authentication through Kerberos fails then |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 588 | the password will be validated via any additional local mechanism |
| 589 | such as |
| 590 | .Pa /etc/passwd . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 591 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 592 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 593 | .It Cm KerberosTicketCleanup |
| 594 | Specifies whether to automatically destroy the user's ticket cache |
| 595 | file on logout. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 596 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 597 | .Dq yes . |
Damien Miller | d5f62bf | 2010-09-24 22:11:14 +1000 | [diff] [blame] | 598 | .It Cm KexAlgorithms |
| 599 | Specifies the available KEX (Key Exchange) algorithms. |
| 600 | Multiple algorithms must be comma-separated. |
| 601 | The default is |
| 602 | .Dq ecdh-sha2-nistp256 , |
| 603 | .Dq ecdh-sha2-nistp384 , |
| 604 | .Dq ecdh-sha2-nistp521 , |
Damien Miller | 0a18473 | 2010-11-20 15:21:03 +1100 | [diff] [blame] | 605 | .Dq diffie-hellman-group-exchange-sha256 , |
Damien Miller | d5f62bf | 2010-09-24 22:11:14 +1000 | [diff] [blame] | 606 | .Dq diffie-hellman-group-exchange-sha1 , |
| 607 | .Dq diffie-hellman-group14-sha1 , |
| 608 | .Dq diffie-hellman-group1-sha1 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 609 | .It Cm KeyRegenerationInterval |
| 610 | In protocol version 1, the ephemeral server key is automatically regenerated |
| 611 | after this many seconds (if it has been used). |
| 612 | The purpose of regeneration is to prevent |
| 613 | decrypting captured sessions by later breaking into the machine and |
| 614 | stealing the keys. |
| 615 | The key is never stored anywhere. |
| 616 | If the value is 0, the key is never regenerated. |
| 617 | The default is 3600 (seconds). |
| 618 | .It Cm ListenAddress |
| 619 | Specifies the local addresses |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 620 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 621 | should listen on. |
| 622 | The following forms may be used: |
| 623 | .Pp |
| 624 | .Bl -item -offset indent -compact |
| 625 | .It |
| 626 | .Cm ListenAddress |
| 627 | .Sm off |
| 628 | .Ar host No | Ar IPv4_addr No | Ar IPv6_addr |
| 629 | .Sm on |
| 630 | .It |
| 631 | .Cm ListenAddress |
| 632 | .Sm off |
| 633 | .Ar host No | Ar IPv4_addr No : Ar port |
| 634 | .Sm on |
| 635 | .It |
| 636 | .Cm ListenAddress |
| 637 | .Sm off |
| 638 | .Oo |
| 639 | .Ar host No | Ar IPv6_addr Oc : Ar port |
| 640 | .Sm on |
| 641 | .El |
| 642 | .Pp |
| 643 | If |
| 644 | .Ar port |
| 645 | is not specified, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 646 | sshd will listen on the address and all prior |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 647 | .Cm Port |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 648 | options specified. |
| 649 | The default is to listen on all local addresses. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 650 | Multiple |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 651 | .Cm ListenAddress |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 652 | options are permitted. |
| 653 | Additionally, any |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 654 | .Cm Port |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 655 | options must precede this option for non-port qualified addresses. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 656 | .It Cm LoginGraceTime |
| 657 | The server disconnects after this time if the user has not |
| 658 | successfully logged in. |
| 659 | If the value is 0, there is no time limit. |
Damien Miller | c134863 | 2002-09-05 14:35:14 +1000 | [diff] [blame] | 660 | The default is 120 seconds. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 661 | .It Cm LogLevel |
| 662 | Gives the verbosity level that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 663 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 664 | The possible values are: |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 665 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 666 | The default is INFO. |
| 667 | DEBUG and DEBUG1 are equivalent. |
| 668 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. |
| 669 | Logging with a DEBUG level violates the privacy of users and is not recommended. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 670 | .It Cm MACs |
| 671 | Specifies the available MAC (message authentication code) algorithms. |
| 672 | The MAC algorithm is used in protocol version 2 |
| 673 | for data integrity protection. |
| 674 | Multiple algorithms must be comma-separated. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 675 | The default is: |
Damien Miller | 22b7b49 | 2007-06-11 14:07:12 +1000 | [diff] [blame] | 676 | .Bd -literal -offset indent |
Darren Tucker | 427e409 | 2012-10-05 11:02:39 +1000 | [diff] [blame] | 677 | hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com, |
Darren Tucker | ecbf14a | 2012-07-02 18:53:37 +1000 | [diff] [blame] | 678 | hmac-sha2-256,hmac-sha2-512,hmac-ripemd160, |
| 679 | hmac-sha1-96,hmac-md5-96 |
Damien Miller | 22b7b49 | 2007-06-11 14:07:12 +1000 | [diff] [blame] | 680 | .Ed |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 681 | .It Cm Match |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 682 | Introduces a conditional block. |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 683 | If all of the criteria on the |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 684 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 685 | line are satisfied, the keywords on the following lines override those |
| 686 | set in the global section of the config file, until either another |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 687 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 688 | line or the end of the file. |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 689 | .Pp |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 690 | The arguments to |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 691 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 692 | are one or more criteria-pattern pairs. |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 693 | The available criteria are |
| 694 | .Cm User , |
Damien Miller | 565ca3f | 2006-08-19 00:23:15 +1000 | [diff] [blame] | 695 | .Cm Group , |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 696 | .Cm Host , |
Darren Tucker | fbcf827 | 2012-05-19 19:37:01 +1000 | [diff] [blame] | 697 | .Cm LocalAddress , |
| 698 | .Cm LocalPort , |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 699 | and |
| 700 | .Cm Address . |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 701 | The match patterns may consist of single entries or comma-separated |
| 702 | lists and may use the wildcard and negation operators described in the |
Darren Tucker | b06cc4a | 2008-06-10 22:59:53 +1000 | [diff] [blame] | 703 | .Sx PATTERNS |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 704 | section of |
Darren Tucker | b06cc4a | 2008-06-10 22:59:53 +1000 | [diff] [blame] | 705 | .Xr ssh_config 5 . |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 706 | .Pp |
| 707 | The patterns in an |
| 708 | .Cm Address |
| 709 | criteria may additionally contain addresses to match in CIDR |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 710 | address/masklen format, e.g.\& |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 711 | .Dq 192.0.2.0/24 |
| 712 | or |
| 713 | .Dq 3ffe:ffff::/32 . |
| 714 | Note that the mask length provided must be consistent with the address - |
| 715 | it is an error to specify a mask length that is too long for the address |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 716 | or one with bits set in this host portion of the address. |
| 717 | For example, |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 718 | .Dq 192.0.2.0/33 |
| 719 | and |
Darren Tucker | 6a2a400 | 2008-06-10 23:03:04 +1000 | [diff] [blame] | 720 | .Dq 192.0.2.0/8 |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 721 | respectively. |
| 722 | .Pp |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 723 | Only a subset of keywords may be used on the lines following a |
| 724 | .Cm Match |
| 725 | keyword. |
| 726 | Available keywords are |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 727 | .Cm AcceptEnv , |
Damien Miller | 1781901 | 2009-01-28 16:20:17 +1100 | [diff] [blame] | 728 | .Cm AllowAgentForwarding , |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 729 | .Cm AllowGroups , |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 730 | .Cm AllowTcpForwarding , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 731 | .Cm AllowUsers , |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 732 | .Cm AuthorizedKeysCommand , |
| 733 | .Cm AuthorizedKeysCommandUser , |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame^] | 734 | .Cm AuthorizedKeysFile , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 735 | .Cm AuthorizedPrincipalsFile , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 736 | .Cm Banner , |
Damien Miller | 797e3d1 | 2008-05-19 14:27:42 +1000 | [diff] [blame] | 737 | .Cm ChrootDirectory , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 738 | .Cm DenyGroups , |
| 739 | .Cm DenyUsers , |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 740 | .Cm ForceCommand , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 741 | .Cm GatewayPorts , |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 742 | .Cm GSSAPIAuthentication , |
Damien Miller | 25434de | 2008-05-19 14:29:08 +1000 | [diff] [blame] | 743 | .Cm HostbasedAuthentication , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 744 | .Cm HostbasedUsesNameFromPacketOnly , |
Darren Tucker | 1d75f22 | 2007-03-01 21:31:28 +1100 | [diff] [blame] | 745 | .Cm KbdInteractiveAuthentication , |
Damien Miller | 5737e36 | 2007-03-06 21:21:18 +1100 | [diff] [blame] | 746 | .Cm KerberosAuthentication , |
Damien Miller | 307c1d1 | 2008-06-16 07:56:20 +1000 | [diff] [blame] | 747 | .Cm MaxAuthTries , |
Damien Miller | c62a5af | 2008-06-16 07:55:46 +1000 | [diff] [blame] | 748 | .Cm MaxSessions , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 749 | .Cm PasswordAuthentication , |
Damien Miller | 51bde60 | 2008-11-03 19:23:10 +1100 | [diff] [blame] | 750 | .Cm PermitEmptyPasswords , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 751 | .Cm PermitOpen , |
Darren Tucker | 15f9427 | 2008-01-01 20:36:56 +1100 | [diff] [blame] | 752 | .Cm PermitRootLogin , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 753 | .Cm PermitTunnel , |
Darren Tucker | 1477ea1 | 2009-10-07 08:36:05 +1100 | [diff] [blame] | 754 | .Cm PubkeyAuthentication , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 755 | .Cm RhostsRSAAuthentication , |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 756 | .Cm RSAAuthentication , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 757 | .Cm X11DisplayOffset , |
Damien Miller | 1991384 | 2009-02-23 10:53:58 +1100 | [diff] [blame] | 758 | .Cm X11Forwarding |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 759 | and |
Damien Miller | 0296ae8 | 2009-02-23 11:00:24 +1100 | [diff] [blame] | 760 | .Cm X11UseLocalHost . |
Darren Tucker | 89413db | 2004-05-24 10:36:23 +1000 | [diff] [blame] | 761 | .It Cm MaxAuthTries |
| 762 | Specifies the maximum number of authentication attempts permitted per |
Damien Miller | 26213e5 | 2004-06-30 22:39:34 +1000 | [diff] [blame] | 763 | connection. |
| 764 | Once the number of failures reaches half this value, |
| 765 | additional failures are logged. |
| 766 | The default is 6. |
Damien Miller | 7207f64 | 2008-05-19 15:34:50 +1000 | [diff] [blame] | 767 | .It Cm MaxSessions |
| 768 | Specifies the maximum number of open sessions permitted per network connection. |
| 769 | The default is 10. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 770 | .It Cm MaxStartups |
| 771 | Specifies the maximum number of concurrent unauthenticated connections to the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 772 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 773 | Additional connections will be dropped until authentication succeeds or the |
| 774 | .Cm LoginGraceTime |
| 775 | expires for a connection. |
| 776 | The default is 10. |
| 777 | .Pp |
| 778 | Alternatively, random early drop can be enabled by specifying |
| 779 | the three colon separated values |
| 780 | .Dq start:rate:full |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 781 | (e.g. "10:30:60"). |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 782 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 783 | will refuse connection attempts with a probability of |
| 784 | .Dq rate/100 |
| 785 | (30%) |
| 786 | if there are currently |
| 787 | .Dq start |
| 788 | (10) |
| 789 | unauthenticated connections. |
| 790 | The probability increases linearly and all connection attempts |
| 791 | are refused if the number of unauthenticated connections reaches |
| 792 | .Dq full |
| 793 | (60). |
| 794 | .It Cm PasswordAuthentication |
| 795 | Specifies whether password authentication is allowed. |
| 796 | The default is |
| 797 | .Dq yes . |
| 798 | .It Cm PermitEmptyPasswords |
| 799 | When password authentication is allowed, it specifies whether the |
| 800 | server allows login to accounts with empty password strings. |
| 801 | The default is |
| 802 | .Dq no . |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 803 | .It Cm PermitOpen |
| 804 | Specifies the destinations to which TCP port forwarding is permitted. |
| 805 | The forwarding specification must be one of the following forms: |
| 806 | .Pp |
| 807 | .Bl -item -offset indent -compact |
| 808 | .It |
| 809 | .Cm PermitOpen |
| 810 | .Sm off |
| 811 | .Ar host : port |
| 812 | .Sm on |
| 813 | .It |
| 814 | .Cm PermitOpen |
| 815 | .Sm off |
| 816 | .Ar IPv4_addr : port |
| 817 | .Sm on |
| 818 | .It |
| 819 | .Cm PermitOpen |
| 820 | .Sm off |
| 821 | .Ar \&[ IPv6_addr \&] : port |
| 822 | .Sm on |
| 823 | .El |
| 824 | .Pp |
Damien Miller | a765cf4 | 2006-07-24 14:08:13 +1000 | [diff] [blame] | 825 | Multiple forwards may be specified by separating them with whitespace. |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 826 | An argument of |
| 827 | .Dq any |
| 828 | can be used to remove all restrictions and permit any forwarding requests. |
Darren Tucker | ba9ea32 | 2012-05-19 19:37:33 +1000 | [diff] [blame] | 829 | An argument of |
| 830 | .Dq none |
| 831 | can be used to prohibit all forwarding requests. |
Damien Miller | 65bc2c4 | 2006-07-24 14:04:16 +1000 | [diff] [blame] | 832 | By default all port forwarding requests are permitted. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 833 | .It Cm PermitRootLogin |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 834 | Specifies whether root can log in using |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 835 | .Xr ssh 1 . |
| 836 | The argument must be |
| 837 | .Dq yes , |
| 838 | .Dq without-password , |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 839 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 840 | or |
| 841 | .Dq no . |
| 842 | The default is |
| 843 | .Dq yes . |
| 844 | .Pp |
| 845 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 846 | .Dq without-password , |
Darren Tucker | 9dca099 | 2005-02-01 19:16:45 +1100 | [diff] [blame] | 847 | password authentication is disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 848 | .Pp |
| 849 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 850 | .Dq forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 851 | root login with public key authentication will be allowed, |
| 852 | but only if the |
| 853 | .Ar command |
| 854 | option has been specified |
| 855 | (which may be useful for taking remote backups even if root login is |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 856 | normally not allowed). |
| 857 | All other authentication methods are disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 858 | .Pp |
| 859 | If this option is set to |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 860 | .Dq no , |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 861 | root is not allowed to log in. |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 862 | .It Cm PermitTunnel |
| 863 | Specifies whether |
| 864 | .Xr tun 4 |
| 865 | device forwarding is allowed. |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 866 | The argument must be |
| 867 | .Dq yes , |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 868 | .Dq point-to-point |
| 869 | (layer 3), |
| 870 | .Dq ethernet |
| 871 | (layer 2), or |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 872 | .Dq no . |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 873 | Specifying |
| 874 | .Dq yes |
| 875 | permits both |
| 876 | .Dq point-to-point |
| 877 | and |
| 878 | .Dq ethernet . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 879 | The default is |
| 880 | .Dq no . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 881 | .It Cm PermitUserEnvironment |
| 882 | Specifies whether |
| 883 | .Pa ~/.ssh/environment |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 884 | and |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 885 | .Cm environment= |
| 886 | options in |
| 887 | .Pa ~/.ssh/authorized_keys |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 888 | are processed by |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 889 | .Xr sshd 8 . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 890 | The default is |
| 891 | .Dq no . |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 892 | Enabling environment processing may enable users to bypass access |
| 893 | restrictions in some configurations using mechanisms such as |
| 894 | .Ev LD_PRELOAD . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 895 | .It Cm PidFile |
Ben Lindstrom | 959de99 | 2002-06-23 00:35:25 +0000 | [diff] [blame] | 896 | Specifies the file that contains the process ID of the |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 897 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 898 | The default is |
| 899 | .Pa /var/run/sshd.pid . |
| 900 | .It Cm Port |
| 901 | Specifies the port number that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 902 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 903 | listens on. |
| 904 | The default is 22. |
| 905 | Multiple options of this type are permitted. |
| 906 | See also |
| 907 | .Cm ListenAddress . |
| 908 | .It Cm PrintLastLog |
| 909 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 910 | .Xr sshd 8 |
Darren Tucker | 7cc5c23 | 2004-11-05 20:06:59 +1100 | [diff] [blame] | 911 | should print the date and time of the last user login when a user logs |
| 912 | in interactively. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 913 | The default is |
| 914 | .Dq yes . |
| 915 | .It Cm PrintMotd |
| 916 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 917 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 918 | should print |
| 919 | .Pa /etc/motd |
| 920 | when a user logs in interactively. |
| 921 | (On some systems it is also printed by the shell, |
| 922 | .Pa /etc/profile , |
| 923 | or equivalent.) |
| 924 | The default is |
| 925 | .Dq yes . |
| 926 | .It Cm Protocol |
| 927 | Specifies the protocol versions |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 928 | .Xr sshd 8 |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 929 | supports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 930 | The possible values are |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 931 | .Sq 1 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 932 | and |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 933 | .Sq 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 934 | Multiple versions must be comma-separated. |
| 935 | The default is |
Darren Tucker | 7a4a765 | 2009-10-11 21:51:40 +1100 | [diff] [blame] | 936 | .Sq 2 . |
Ben Lindstrom | 9c44554 | 2002-07-11 03:59:18 +0000 | [diff] [blame] | 937 | Note that the order of the protocol list does not indicate preference, |
| 938 | because the client selects among multiple protocol versions offered |
| 939 | by the server. |
| 940 | Specifying |
| 941 | .Dq 2,1 |
| 942 | is identical to |
| 943 | .Dq 1,2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 944 | .It Cm PubkeyAuthentication |
| 945 | Specifies whether public key authentication is allowed. |
| 946 | The default is |
| 947 | .Dq yes . |
| 948 | Note that this option applies to protocol version 2 only. |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 949 | .It Cm RevokedKeys |
| 950 | Specifies a list of revoked public keys. |
| 951 | Keys listed in this file will be refused for public key authentication. |
| 952 | Note that if this file is not readable, then public key authentication will |
| 953 | be refused for all users. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 954 | .It Cm RhostsRSAAuthentication |
| 955 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 956 | with successful RSA host authentication is allowed. |
| 957 | The default is |
| 958 | .Dq no . |
| 959 | This option applies to protocol version 1 only. |
| 960 | .It Cm RSAAuthentication |
| 961 | Specifies whether pure RSA authentication is allowed. |
| 962 | The default is |
| 963 | .Dq yes . |
| 964 | This option applies to protocol version 1 only. |
| 965 | .It Cm ServerKeyBits |
| 966 | Defines the number of bits in the ephemeral protocol version 1 server key. |
Darren Tucker | 7499b0c | 2008-07-02 22:35:43 +1000 | [diff] [blame] | 967 | The minimum value is 512, and the default is 1024. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 968 | .It Cm StrictModes |
| 969 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 970 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 971 | should check file modes and ownership of the |
| 972 | user's files and home directory before accepting login. |
| 973 | This is normally desirable because novices sometimes accidentally leave their |
| 974 | directory or files world-writable. |
| 975 | The default is |
| 976 | .Dq yes . |
Darren Tucker | f788a91 | 2010-01-08 17:06:47 +1100 | [diff] [blame] | 977 | Note that this does not apply to |
| 978 | .Cm ChrootDirectory , |
| 979 | whose permissions and ownership are checked unconditionally. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 980 | .It Cm Subsystem |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 981 | Configures an external subsystem (e.g. file transfer daemon). |
Damien Miller | 917f9b6 | 2006-07-10 20:36:47 +1000 | [diff] [blame] | 982 | Arguments should be a subsystem name and a command (with optional arguments) |
| 983 | to execute upon subsystem request. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 984 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 985 | The command |
| 986 | .Xr sftp-server 8 |
| 987 | implements the |
| 988 | .Dq sftp |
| 989 | file transfer subsystem. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 990 | .Pp |
| 991 | Alternately the name |
| 992 | .Dq internal-sftp |
| 993 | implements an in-process |
| 994 | .Dq sftp |
| 995 | server. |
| 996 | This may simplify configurations using |
| 997 | .Cm ChrootDirectory |
| 998 | to force a different filesystem root on clients. |
| 999 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1000 | By default no subsystems are defined. |
| 1001 | Note that this option applies to protocol version 2 only. |
| 1002 | .It Cm SyslogFacility |
| 1003 | Gives the facility code that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1004 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1005 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
| 1006 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. |
| 1007 | The default is AUTH. |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 1008 | .It Cm TCPKeepAlive |
| 1009 | Specifies whether the system should send TCP keepalive messages to the |
| 1010 | other side. |
| 1011 | If they are sent, death of the connection or crash of one |
| 1012 | of the machines will be properly noticed. |
| 1013 | However, this means that |
| 1014 | connections will die if the route is down temporarily, and some people |
| 1015 | find it annoying. |
| 1016 | On the other hand, if TCP keepalives are not sent, |
| 1017 | sessions may hang indefinitely on the server, leaving |
| 1018 | .Dq ghost |
| 1019 | users and consuming server resources. |
| 1020 | .Pp |
| 1021 | The default is |
| 1022 | .Dq yes |
| 1023 | (to send TCP keepalive messages), and the server will notice |
| 1024 | if the network goes down or the client host crashes. |
| 1025 | This avoids infinitely hanging sessions. |
| 1026 | .Pp |
| 1027 | To disable TCP keepalive messages, the value should be set to |
| 1028 | .Dq no . |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1029 | .It Cm TrustedUserCAKeys |
| 1030 | Specifies a file containing public keys of certificate authorities that are |
Damien Miller | c6db99e | 2010-03-05 10:41:45 +1100 | [diff] [blame] | 1031 | trusted to sign user certificates for authentication. |
Damien Miller | 72b3382 | 2010-03-05 07:39:01 +1100 | [diff] [blame] | 1032 | Keys are listed one per line; empty lines and comments starting with |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1033 | .Ql # |
| 1034 | are allowed. |
| 1035 | If a certificate is presented for authentication and has its signing CA key |
| 1036 | listed in this file, then it may be used for authentication for any user |
| 1037 | listed in the certificate's principals list. |
| 1038 | Note that certificates that lack a list of principals will not be permitted |
| 1039 | for authentication using |
| 1040 | .Cm TrustedUserCAKeys . |
Damien Miller | 72b3382 | 2010-03-05 07:39:01 +1100 | [diff] [blame] | 1041 | For more details on certificates, see the |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1042 | .Sx CERTIFICATES |
| 1043 | section in |
| 1044 | .Xr ssh-keygen 1 . |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 1045 | .It Cm UseDNS |
| 1046 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1047 | .Xr sshd 8 |
Darren Tucker | 83d5a98 | 2005-03-31 21:33:50 +1000 | [diff] [blame] | 1048 | should look up the remote host name and check that |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 1049 | the resolved host name for the remote IP address maps back to the |
| 1050 | very same IP address. |
| 1051 | The default is |
| 1052 | .Dq yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1053 | .It Cm UseLogin |
| 1054 | Specifies whether |
| 1055 | .Xr login 1 |
| 1056 | is used for interactive login sessions. |
| 1057 | The default is |
| 1058 | .Dq no . |
| 1059 | Note that |
| 1060 | .Xr login 1 |
| 1061 | is never used for remote command execution. |
| 1062 | Note also, that if this is enabled, |
| 1063 | .Cm X11Forwarding |
| 1064 | will be disabled because |
| 1065 | .Xr login 1 |
| 1066 | does not know how to handle |
| 1067 | .Xr xauth 1 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1068 | cookies. |
| 1069 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1070 | .Cm UsePrivilegeSeparation |
| 1071 | is specified, it will be disabled after authentication. |
Damien Miller | 2e193e2 | 2003-05-14 15:13:03 +1000 | [diff] [blame] | 1072 | .It Cm UsePAM |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 1073 | Enables the Pluggable Authentication Module interface. |
| 1074 | If set to |
| 1075 | .Dq yes |
| 1076 | this will enable PAM authentication using |
| 1077 | .Cm ChallengeResponseAuthentication |
Darren Tucker | a4904f7 | 2006-02-23 21:35:30 +1100 | [diff] [blame] | 1078 | and |
| 1079 | .Cm PasswordAuthentication |
| 1080 | in addition to PAM account and session module processing for all |
| 1081 | authentication types. |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 1082 | .Pp |
| 1083 | Because PAM challenge-response authentication usually serves an equivalent |
| 1084 | role to password authentication, you should disable either |
| 1085 | .Cm PasswordAuthentication |
| 1086 | or |
| 1087 | .Cm ChallengeResponseAuthentication. |
| 1088 | .Pp |
| 1089 | If |
| 1090 | .Cm UsePAM |
| 1091 | is enabled, you will not be able to run |
| 1092 | .Xr sshd 8 |
| 1093 | as a non-root user. |
| 1094 | The default is |
Darren Tucker | 6c0c070 | 2003-10-09 14:13:53 +1000 | [diff] [blame] | 1095 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1096 | .It Cm UsePrivilegeSeparation |
| 1097 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1098 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1099 | separates privileges by creating an unprivileged child process |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1100 | to deal with incoming network traffic. |
| 1101 | After successful authentication, another process will be created that has |
| 1102 | the privilege of the authenticated user. |
| 1103 | The goal of privilege separation is to prevent privilege |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1104 | escalation by containing any corruption within the unprivileged processes. |
| 1105 | The default is |
| 1106 | .Dq yes . |
Damien Miller | 69ff1df | 2011-06-23 08:30:03 +1000 | [diff] [blame] | 1107 | If |
| 1108 | .Cm UsePrivilegeSeparation |
| 1109 | is set to |
| 1110 | .Dq sandbox |
| 1111 | then the pre-authentication unprivileged process is subject to additional |
| 1112 | restrictions. |
Damien Miller | 2352881 | 2012-04-22 11:24:43 +1000 | [diff] [blame] | 1113 | .It Cm VersionAddendum |
| 1114 | Optionally specifies additional text to append to the SSH protocol banner |
| 1115 | sent by the server upon connection. |
| 1116 | The default is |
| 1117 | .Dq none . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1118 | .It Cm X11DisplayOffset |
| 1119 | Specifies the first display number available for |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1120 | .Xr sshd 8 Ns 's |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1121 | X11 forwarding. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1122 | This prevents sshd from interfering with real X11 servers. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1123 | The default is 10. |
| 1124 | .It Cm X11Forwarding |
| 1125 | Specifies whether X11 forwarding is permitted. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1126 | The argument must be |
| 1127 | .Dq yes |
| 1128 | or |
| 1129 | .Dq no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1130 | The default is |
| 1131 | .Dq no . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1132 | .Pp |
| 1133 | When X11 forwarding is enabled, there may be additional exposure to |
| 1134 | the server and to client displays if the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1135 | .Xr sshd 8 |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1136 | proxy display is configured to listen on the wildcard address (see |
| 1137 | .Cm X11UseLocalhost |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1138 | below), though this is not the default. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1139 | Additionally, the authentication spoofing and authentication data |
| 1140 | verification and substitution occur on the client side. |
| 1141 | The security risk of using X11 forwarding is that the client's X11 |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1142 | display server may be exposed to attack when the SSH client requests |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1143 | forwarding (see the warnings for |
| 1144 | .Cm ForwardX11 |
| 1145 | in |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1146 | .Xr ssh_config 5 ) . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1147 | A system administrator may have a stance in which they want to |
| 1148 | protect clients that may expose themselves to attack by unwittingly |
| 1149 | requesting X11 forwarding, which can warrant a |
| 1150 | .Dq no |
| 1151 | setting. |
| 1152 | .Pp |
| 1153 | Note that disabling X11 forwarding does not prevent users from |
| 1154 | forwarding X11 traffic, as users can always install their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1155 | X11 forwarding is automatically disabled if |
| 1156 | .Cm UseLogin |
| 1157 | is enabled. |
| 1158 | .It Cm X11UseLocalhost |
| 1159 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1160 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1161 | should bind the X11 forwarding server to the loopback address or to |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1162 | the wildcard address. |
| 1163 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1164 | sshd binds the forwarding server to the loopback address and sets the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1165 | hostname part of the |
| 1166 | .Ev DISPLAY |
| 1167 | environment variable to |
| 1168 | .Dq localhost . |
Ben Lindstrom | 15b6120 | 2002-08-20 18:44:24 +0000 | [diff] [blame] | 1169 | This prevents remote hosts from connecting to the proxy display. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1170 | However, some older X11 clients may not function with this |
| 1171 | configuration. |
| 1172 | .Cm X11UseLocalhost |
| 1173 | may be set to |
| 1174 | .Dq no |
| 1175 | to specify that the forwarding server should be bound to the wildcard |
| 1176 | address. |
| 1177 | The argument must be |
| 1178 | .Dq yes |
| 1179 | or |
| 1180 | .Dq no . |
| 1181 | The default is |
| 1182 | .Dq yes . |
| 1183 | .It Cm XAuthLocation |
Damien Miller | 05913ba | 2002-09-04 16:51:03 +1000 | [diff] [blame] | 1184 | Specifies the full pathname of the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1185 | .Xr xauth 1 |
| 1186 | program. |
| 1187 | The default is |
| 1188 | .Pa /usr/X11R6/bin/xauth . |
| 1189 | .El |
Damien Miller | e3beba2 | 2006-03-15 11:59:25 +1100 | [diff] [blame] | 1190 | .Sh TIME FORMATS |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1191 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1192 | command-line arguments and configuration file options that specify time |
| 1193 | may be expressed using a sequence of the form: |
| 1194 | .Sm off |
Ben Lindstrom | 1f8cf4f | 2002-08-20 18:43:27 +0000 | [diff] [blame] | 1195 | .Ar time Op Ar qualifier , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1196 | .Sm on |
| 1197 | where |
| 1198 | .Ar time |
| 1199 | is a positive integer value and |
| 1200 | .Ar qualifier |
| 1201 | is one of the following: |
| 1202 | .Pp |
| 1203 | .Bl -tag -width Ds -compact -offset indent |
Damien Miller | 393821a | 2006-07-24 14:04:53 +1000 | [diff] [blame] | 1204 | .It Aq Cm none |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1205 | seconds |
| 1206 | .It Cm s | Cm S |
| 1207 | seconds |
| 1208 | .It Cm m | Cm M |
| 1209 | minutes |
| 1210 | .It Cm h | Cm H |
| 1211 | hours |
| 1212 | .It Cm d | Cm D |
| 1213 | days |
| 1214 | .It Cm w | Cm W |
| 1215 | weeks |
| 1216 | .El |
| 1217 | .Pp |
| 1218 | Each member of the sequence is added together to calculate |
| 1219 | the total time value. |
| 1220 | .Pp |
| 1221 | Time format examples: |
| 1222 | .Pp |
| 1223 | .Bl -tag -width Ds -compact -offset indent |
| 1224 | .It 600 |
| 1225 | 600 seconds (10 minutes) |
| 1226 | .It 10m |
| 1227 | 10 minutes |
| 1228 | .It 1h30m |
| 1229 | 1 hour 30 minutes (90 minutes) |
| 1230 | .El |
| 1231 | .Sh FILES |
| 1232 | .Bl -tag -width Ds |
| 1233 | .It Pa /etc/ssh/sshd_config |
| 1234 | Contains configuration data for |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1235 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1236 | This file should be writable by root only, but it is recommended |
| 1237 | (though not necessary) that it be world-readable. |
| 1238 | .El |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1239 | .Sh SEE ALSO |
| 1240 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1241 | .Sh AUTHORS |
| 1242 | OpenSSH is a derivative of the original and free |
| 1243 | ssh 1.2.12 release by Tatu Ylonen. |
| 1244 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, |
| 1245 | Theo de Raadt and Dug Song |
| 1246 | removed many bugs, re-added newer features and |
| 1247 | created OpenSSH. |
| 1248 | Markus Friedl contributed the support for SSH |
| 1249 | protocol versions 1.5 and 2.0. |
| 1250 | Niels Provos and Markus Friedl contributed support |
| 1251 | for privilege separation. |