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