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