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 | .\" |
schwarze@openbsd.org | db7606d | 2019-05-14 12:47:17 +0000 | [diff] [blame] | 36 | .\" $OpenBSD: sshd_config.5,v 1.285 2019/05/14 12:47:17 schwarze Exp $ |
| 37 | .Dd $Mdocdate: May 14 2019 $ |
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 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 43 | .Sh DESCRIPTION |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 44 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 45 | reads configuration data from |
| 46 | .Pa /etc/ssh/sshd_config |
| 47 | (or the file specified with |
| 48 | .Fl f |
| 49 | on the command line). |
| 50 | The file contains keyword-argument pairs, one per line. |
benno@openbsd.org | cfa4682 | 2017-10-09 20:12:51 +0000 | [diff] [blame] | 51 | For each keyword, the first obtained value will be used. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 52 | Lines starting with |
| 53 | .Ql # |
| 54 | and empty lines are interpreted as comments. |
Damien Miller | 306d118 | 2006-03-15 12:05:59 +1100 | [diff] [blame] | 55 | Arguments may optionally be enclosed in double quotes |
| 56 | .Pq \&" |
| 57 | in order to represent arguments containing spaces. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 58 | .Pp |
| 59 | The possible |
| 60 | keywords and their meanings are as follows (note that |
| 61 | keywords are case-insensitive and arguments are case-sensitive): |
| 62 | .Bl -tag -width Ds |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 63 | .It Cm AcceptEnv |
| 64 | Specifies what environment variables sent by the client will be copied into |
| 65 | the session's |
| 66 | .Xr environ 7 . |
| 67 | See |
| 68 | .Cm SendEnv |
djm@openbsd.org | 7082bb5 | 2018-06-09 03:01:12 +0000 | [diff] [blame] | 69 | and |
| 70 | .Cm SetEnv |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 71 | in |
| 72 | .Xr ssh_config 5 |
| 73 | for how to configure the client. |
jmc@openbsd.org | a685ae8 | 2016-02-17 07:38:19 +0000 | [diff] [blame] | 74 | The |
dtucker@openbsd.org | 85b96ef | 2015-04-28 10:17:58 +0000 | [diff] [blame] | 75 | .Ev TERM |
djm@openbsd.org | 1678d42 | 2018-06-09 03:18:11 +0000 | [diff] [blame] | 76 | environment variable is always accepted whenever the client |
djm@openbsd.org | 732d61f | 2015-06-05 03:44:14 +0000 | [diff] [blame] | 77 | requests a pseudo-terminal as it is required by the protocol. |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 78 | Variables are specified by name, which may contain the wildcard characters |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 79 | .Ql * |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 80 | and |
| 81 | .Ql \&? . |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 82 | Multiple environment variables may be separated by whitespace or spread |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 83 | across multiple |
| 84 | .Cm AcceptEnv |
| 85 | directives. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 86 | Be warned that some environment variables could be used to bypass restricted |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 87 | user environments. |
| 88 | For this reason, care should be taken in the use of this directive. |
| 89 | The default is not to accept any environment variables. |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 90 | .It Cm AddressFamily |
| 91 | Specifies which address family should be used by |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 92 | .Xr sshd 8 . |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 93 | Valid arguments are |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 94 | .Cm any |
| 95 | (the default), |
| 96 | .Cm inet |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 97 | (use IPv4 only), or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 98 | .Cm inet6 |
Darren Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 99 | (use IPv6 only). |
Damien Miller | e989019 | 2008-05-19 14:59:02 +1000 | [diff] [blame] | 100 | .It Cm AllowAgentForwarding |
| 101 | Specifies whether |
| 102 | .Xr ssh-agent 1 |
| 103 | forwarding is permitted. |
| 104 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 105 | .Cm yes . |
Damien Miller | e989019 | 2008-05-19 14:59:02 +1000 | [diff] [blame] | 106 | Note that disabling agent forwarding does not improve security |
| 107 | unless users are also denied shell access, as they can always install |
| 108 | their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 109 | .It Cm AllowGroups |
| 110 | This keyword can be followed by a list of group name patterns, separated |
| 111 | by spaces. |
| 112 | If specified, login is allowed only for users whose primary |
| 113 | group or supplementary group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 114 | Only group names are valid; a numerical group ID is not recognized. |
| 115 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 116 | The allow/deny directives are processed in the following order: |
| 117 | .Cm DenyUsers , |
| 118 | .Cm AllowUsers , |
| 119 | .Cm DenyGroups , |
| 120 | and finally |
| 121 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 122 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 123 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 124 | .Xr ssh_config 5 |
| 125 | for more information on patterns. |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 126 | .It Cm AllowStreamLocalForwarding |
| 127 | Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted. |
| 128 | The available options are |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 129 | .Cm yes |
| 130 | (the default) |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 131 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 132 | .Cm all |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 133 | to allow StreamLocal forwarding, |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 134 | .Cm no |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 135 | to prevent all StreamLocal forwarding, |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 136 | .Cm local |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 137 | to allow local (from the perspective of |
| 138 | .Xr ssh 1 ) |
| 139 | forwarding only or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 140 | .Cm remote |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 141 | to allow remote forwarding only. |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 142 | Note that disabling StreamLocal forwarding does not improve security unless |
| 143 | users are also denied shell access, as they can always install their |
| 144 | own forwarders. |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 145 | .It Cm AllowTcpForwarding |
| 146 | Specifies whether TCP forwarding is permitted. |
| 147 | The available options are |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 148 | .Cm yes |
| 149 | (the default) |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 150 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 151 | .Cm all |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 152 | to allow TCP forwarding, |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 153 | .Cm no |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 154 | to prevent all TCP forwarding, |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 155 | .Cm local |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 156 | to allow local (from the perspective of |
| 157 | .Xr ssh 1 ) |
| 158 | forwarding only or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 159 | .Cm remote |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 160 | to allow remote forwarding only. |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 161 | Note that disabling TCP forwarding does not improve security unless |
| 162 | users are also denied shell access, as they can always install their |
| 163 | own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 164 | .It Cm AllowUsers |
| 165 | This keyword can be followed by a list of user name patterns, separated |
| 166 | by spaces. |
Damien Miller | 5a93add | 2003-01-24 11:34:52 +1100 | [diff] [blame] | 167 | If specified, login is allowed only for user names that |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 168 | match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 169 | Only user names are valid; a numerical user ID is not recognized. |
| 170 | By default, login is allowed for all users. |
| 171 | If the pattern takes the form USER@HOST then USER and HOST |
| 172 | are separately checked, restricting logins to particular |
| 173 | users from particular hosts. |
jmc@openbsd.org | ee1e0a1 | 2016-04-27 13:53:48 +0000 | [diff] [blame] | 174 | HOST criteria may additionally contain addresses to match in CIDR |
| 175 | address/masklen format. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 176 | The allow/deny directives are processed in the following order: |
| 177 | .Cm DenyUsers , |
| 178 | .Cm AllowUsers , |
| 179 | .Cm DenyGroups , |
| 180 | and finally |
| 181 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 182 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 183 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 184 | .Xr ssh_config 5 |
| 185 | for more information on patterns. |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 186 | .It Cm AuthenticationMethods |
| 187 | Specifies the authentication methods that must be successfully completed |
| 188 | for a user to be granted access. |
djm@openbsd.org | 472269f | 2018-07-20 05:01:10 +0000 | [diff] [blame] | 189 | This option must be followed by one or more lists of comma-separated |
djm@openbsd.org | b64faeb | 2016-06-17 05:03:40 +0000 | [diff] [blame] | 190 | authentication method names, or by the single string |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 191 | .Cm any |
djm@openbsd.org | b64faeb | 2016-06-17 05:03:40 +0000 | [diff] [blame] | 192 | to indicate the default behaviour of accepting any single authentication |
jmc@openbsd.org | ad23a75 | 2016-06-17 06:33:30 +0000 | [diff] [blame] | 193 | method. |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 194 | If the default is overridden, then successful authentication requires |
djm@openbsd.org | b64faeb | 2016-06-17 05:03:40 +0000 | [diff] [blame] | 195 | completion of every method in at least one of these lists. |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 196 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 197 | For example, |
| 198 | .Qq publickey,password publickey,keyboard-interactive |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 199 | would require the user to complete public key authentication, followed by |
| 200 | either password or keyboard interactive authentication. |
| 201 | Only methods that are next in one or more lists are offered at each stage, |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 202 | so for this example it would not be possible to attempt password or |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 203 | keyboard-interactive authentication before public key. |
| 204 | .Pp |
Damien Miller | 91a55f2 | 2013-04-23 15:18:10 +1000 | [diff] [blame] | 205 | For keyboard interactive authentication it is also possible to |
| 206 | restrict authentication to a specific device by appending a |
| 207 | colon followed by the device identifier |
Damien Miller | 87f08be | 2018-07-20 13:18:28 +1000 | [diff] [blame] | 208 | .Cm bsdauth |
Damien Miller | 91a55f2 | 2013-04-23 15:18:10 +1000 | [diff] [blame] | 209 | or |
Damien Miller | 87f08be | 2018-07-20 13:18:28 +1000 | [diff] [blame] | 210 | .Cm pam . |
Damien Miller | 91a55f2 | 2013-04-23 15:18:10 +1000 | [diff] [blame] | 211 | depending on the server configuration. |
| 212 | For example, |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 213 | .Qq keyboard-interactive:bsdauth |
Damien Miller | 91a55f2 | 2013-04-23 15:18:10 +1000 | [diff] [blame] | 214 | would restrict keyboard interactive authentication to the |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 215 | .Cm bsdauth |
Damien Miller | 91a55f2 | 2013-04-23 15:18:10 +1000 | [diff] [blame] | 216 | device. |
| 217 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 218 | If the publickey method is listed more than once, |
djm@openbsd.org | f69b69b | 2014-12-22 07:51:30 +0000 | [diff] [blame] | 219 | .Xr sshd 8 |
| 220 | verifies that keys that have been used successfully are not reused for |
| 221 | subsequent authentications. |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 222 | For example, |
| 223 | .Qq publickey,publickey |
| 224 | requires successful authentication using two different public keys. |
djm@openbsd.org | f69b69b | 2014-12-22 07:51:30 +0000 | [diff] [blame] | 225 | .Pp |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 226 | Note that each authentication method listed should also be explicitly enabled |
| 227 | in the configuration. |
djm@openbsd.org | 8042bad | 2017-09-01 05:50:48 +0000 | [diff] [blame] | 228 | .Pp |
| 229 | The available authentication methods are: |
| 230 | .Qq gssapi-with-mic , |
| 231 | .Qq hostbased , |
| 232 | .Qq keyboard-interactive , |
| 233 | .Qq none |
| 234 | (used for access to password-less accounts when |
jmc@openbsd.org | f41bcd7 | 2018-05-15 05:40:11 +0000 | [diff] [blame] | 235 | .Cm PermitEmptyPasswords |
djm@openbsd.org | 8042bad | 2017-09-01 05:50:48 +0000 | [diff] [blame] | 236 | is enabled), |
| 237 | .Qq password |
| 238 | and |
| 239 | .Qq publickey . |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 240 | .It Cm AuthorizedKeysCommand |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame] | 241 | Specifies a program to be used to look up the user's public keys. |
djm@openbsd.org | 24232a3 | 2015-05-21 06:38:35 +0000 | [diff] [blame] | 242 | The program must be owned by root, not writable by group or others and |
| 243 | specified by an absolute path. |
djm@openbsd.org | 24232a3 | 2015-05-21 06:38:35 +0000 | [diff] [blame] | 244 | Arguments to |
| 245 | .Cm AuthorizedKeysCommand |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 246 | accept the tokens described in the |
| 247 | .Sx TOKENS |
| 248 | section. |
| 249 | If no arguments are specified then the username of the target user is used. |
djm@openbsd.org | 24232a3 | 2015-05-21 06:38:35 +0000 | [diff] [blame] | 250 | .Pp |
| 251 | The program should produce on standard output zero or |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 252 | more lines of authorized_keys output (see |
| 253 | .Sx AUTHORIZED_KEYS |
| 254 | in |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame] | 255 | .Xr sshd 8 ) . |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 256 | If a key supplied by |
| 257 | .Cm AuthorizedKeysCommand |
| 258 | does not successfully authenticate |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 259 | and authorize the user then public key authentication continues using the usual |
| 260 | .Cm AuthorizedKeysFile |
| 261 | files. |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 262 | By default, no |
| 263 | .Cm AuthorizedKeysCommand |
| 264 | is run. |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 265 | .It Cm AuthorizedKeysCommandUser |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 266 | Specifies the user under whose account the |
| 267 | .Cm AuthorizedKeysCommand |
| 268 | is run. |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 269 | It is recommended to use a dedicated user that has no other role on the host |
| 270 | than running authorized keys commands. |
djm@openbsd.org | f1c4d8e | 2014-12-22 08:04:23 +0000 | [diff] [blame] | 271 | If |
djm@openbsd.org | d663bea | 2014-12-11 05:25:06 +0000 | [diff] [blame] | 272 | .Cm AuthorizedKeysCommand |
djm@openbsd.org | f1c4d8e | 2014-12-22 08:04:23 +0000 | [diff] [blame] | 273 | is specified but |
| 274 | .Cm AuthorizedKeysCommandUser |
| 275 | is not, then |
| 276 | .Xr sshd 8 |
| 277 | will refuse to start. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 278 | .It Cm AuthorizedKeysFile |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 279 | Specifies the file that contains the public keys used for user authentication. |
schwarze@openbsd.org | db7606d | 2019-05-14 12:47:17 +0000 | [diff] [blame] | 280 | The format is described in the AUTHORIZED_KEYS FILE FORMAT section of |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 281 | .Xr sshd 8 . |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 282 | Arguments to |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 283 | .Cm AuthorizedKeysFile |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 284 | accept the tokens described in the |
| 285 | .Sx TOKENS |
| 286 | section. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 287 | After expansion, |
| 288 | .Cm AuthorizedKeysFile |
| 289 | is taken to be an absolute path or one relative to the user's home |
| 290 | directory. |
Damien Miller | b9132fc | 2011-05-29 21:41:40 +1000 | [diff] [blame] | 291 | Multiple files may be listed, separated by whitespace. |
djm@openbsd.org | 2bca8a4 | 2015-09-11 03:13:36 +0000 | [diff] [blame] | 292 | Alternately this option may be set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 293 | .Cm none |
djm@openbsd.org | 2bca8a4 | 2015-09-11 03:13:36 +0000 | [diff] [blame] | 294 | to skip checking for user keys in files. |
Damien Miller | b9132fc | 2011-05-29 21:41:40 +1000 | [diff] [blame] | 295 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 296 | .Qq .ssh/authorized_keys .ssh/authorized_keys2 . |
djm@openbsd.org | bcc50d8 | 2015-05-21 06:43:30 +0000 | [diff] [blame] | 297 | .It Cm AuthorizedPrincipalsCommand |
| 298 | Specifies a program to be used to generate the list of allowed |
| 299 | certificate principals as per |
| 300 | .Cm AuthorizedPrincipalsFile . |
| 301 | The program must be owned by root, not writable by group or others and |
| 302 | specified by an absolute path. |
djm@openbsd.org | bcc50d8 | 2015-05-21 06:43:30 +0000 | [diff] [blame] | 303 | Arguments to |
| 304 | .Cm AuthorizedPrincipalsCommand |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 305 | accept the tokens described in the |
| 306 | .Sx TOKENS |
| 307 | section. |
| 308 | If no arguments are specified then the username of the target user is used. |
djm@openbsd.org | bcc50d8 | 2015-05-21 06:43:30 +0000 | [diff] [blame] | 309 | .Pp |
| 310 | The program should produce on standard output zero or |
| 311 | more lines of |
| 312 | .Cm AuthorizedPrincipalsFile |
| 313 | output. |
| 314 | If either |
| 315 | .Cm AuthorizedPrincipalsCommand |
| 316 | or |
| 317 | .Cm AuthorizedPrincipalsFile |
| 318 | is specified, then certificates offered by the client for authentication |
| 319 | must contain a principal that is listed. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 320 | By default, no |
| 321 | .Cm AuthorizedPrincipalsCommand |
| 322 | is run. |
djm@openbsd.org | bcc50d8 | 2015-05-21 06:43:30 +0000 | [diff] [blame] | 323 | .It Cm AuthorizedPrincipalsCommandUser |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 324 | Specifies the user under whose account the |
| 325 | .Cm AuthorizedPrincipalsCommand |
| 326 | is run. |
djm@openbsd.org | bcc50d8 | 2015-05-21 06:43:30 +0000 | [diff] [blame] | 327 | It is recommended to use a dedicated user that has no other role on the host |
| 328 | than running authorized principals commands. |
| 329 | If |
| 330 | .Cm AuthorizedPrincipalsCommand |
| 331 | is specified but |
| 332 | .Cm AuthorizedPrincipalsCommandUser |
| 333 | is not, then |
| 334 | .Xr sshd 8 |
| 335 | will refuse to start. |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 336 | .It Cm AuthorizedPrincipalsFile |
| 337 | Specifies a file that lists principal names that are accepted for |
| 338 | certificate authentication. |
| 339 | When using certificates signed by a key listed in |
| 340 | .Cm TrustedUserCAKeys , |
| 341 | this file lists names, one of which must appear in the certificate for it |
| 342 | to be accepted for authentication. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 343 | Names are listed one per line preceded by key options (as described in |
| 344 | .Sx AUTHORIZED_KEYS FILE FORMAT |
| 345 | in |
Damien Miller | d59dab8 | 2010-07-02 13:37:17 +1000 | [diff] [blame] | 346 | .Xr sshd 8 ) . |
Damien Miller | 6018a36 | 2010-07-02 13:35:19 +1000 | [diff] [blame] | 347 | Empty lines and comments starting with |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 348 | .Ql # |
| 349 | are ignored. |
| 350 | .Pp |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 351 | Arguments to |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 352 | .Cm AuthorizedPrincipalsFile |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 353 | accept the tokens described in the |
| 354 | .Sx TOKENS |
| 355 | section. |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 356 | After expansion, |
| 357 | .Cm AuthorizedPrincipalsFile |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 358 | is taken to be an absolute path or one relative to the user's home directory. |
Damien Miller | 8fef9eb | 2012-04-22 11:25:10 +1000 | [diff] [blame] | 359 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 360 | .Cm none , |
Damien Miller | 8fef9eb | 2012-04-22 11:25:10 +1000 | [diff] [blame] | 361 | 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] | 362 | of the user must appear in a certificate's principals list for it to be |
| 363 | accepted. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 364 | .Pp |
Damien Miller | 30da344 | 2010-05-10 11:58:03 +1000 | [diff] [blame] | 365 | Note that |
| 366 | .Cm AuthorizedPrincipalsFile |
| 367 | is only used when authentication proceeds using a CA listed in |
| 368 | .Cm TrustedUserCAKeys |
| 369 | and is not consulted for certification authorities trusted via |
| 370 | .Pa ~/.ssh/authorized_keys , |
| 371 | though the |
| 372 | .Cm principals= |
| 373 | key option offers a similar facility (see |
| 374 | .Xr sshd 8 |
| 375 | for details). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 376 | .It Cm Banner |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 377 | The contents of the specified file are sent to the remote user before |
| 378 | authentication is allowed. |
Damien Miller | 4890e53 | 2007-09-17 11:57:38 +1000 | [diff] [blame] | 379 | If the argument is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 380 | .Cm none |
Damien Miller | 4890e53 | 2007-09-17 11:57:38 +1000 | [diff] [blame] | 381 | then no banner is displayed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 382 | By default, no banner is displayed. |
djm@openbsd.org | 86e5737 | 2018-09-20 03:28:06 +0000 | [diff] [blame] | 383 | .It Cm CASignatureAlgorithms |
| 384 | Specifies which algorithms are allowed for signing of certificates |
| 385 | by certificate authorities (CAs). |
| 386 | The default is: |
| 387 | .Bd -literal -offset indent |
| 388 | ecdsa-sha2-nistp256.ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
| 389 | ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa |
| 390 | .Ed |
| 391 | .Pp |
| 392 | Certificates signed using other algorithms will not be accepted for |
| 393 | public key or host-based authentication. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 394 | .It Cm ChallengeResponseAuthentication |
Damien Miller | 9c7bf8d | 2009-08-28 10:27:08 +1000 | [diff] [blame] | 395 | Specifies whether challenge-response authentication is allowed (e.g. via |
Damien Miller | e8c9f26 | 2014-10-03 09:24:56 +1000 | [diff] [blame] | 396 | PAM or through authentication styles supported in |
Damien Miller | 9c7bf8d | 2009-08-28 10:27:08 +1000 | [diff] [blame] | 397 | .Xr login.conf 5 ) |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 398 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 399 | .Cm yes . |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 400 | .It Cm ChrootDirectory |
Darren Tucker | b8c884a | 2010-01-08 18:53:43 +1100 | [diff] [blame] | 401 | Specifies the pathname of a directory to |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 402 | .Xr chroot 2 |
| 403 | to after authentication. |
deraadt@openbsd.org | dcff581 | 2015-01-22 20:24:41 +0000 | [diff] [blame] | 404 | At session startup |
| 405 | .Xr sshd 8 |
| 406 | checks that all components of the pathname are root-owned directories |
| 407 | which are not writable by any other user or group. |
Darren Tucker | 51dbe50 | 2009-06-21 17:56:51 +1000 | [diff] [blame] | 408 | After the chroot, |
| 409 | .Xr sshd 8 |
| 410 | changes the working directory to the user's home directory. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 411 | Arguments to |
| 412 | .Cm ChrootDirectory |
| 413 | accept the tokens described in the |
| 414 | .Sx TOKENS |
| 415 | section. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 416 | .Pp |
| 417 | The |
| 418 | .Cm ChrootDirectory |
| 419 | must contain the necessary files and directories to support the |
Darren Tucker | af501cf | 2009-06-21 17:53:04 +1000 | [diff] [blame] | 420 | user's session. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 421 | For an interactive session this requires at least a shell, typically |
| 422 | .Xr sh 1 , |
| 423 | and basic |
| 424 | .Pa /dev |
| 425 | nodes such as |
| 426 | .Xr null 4 , |
| 427 | .Xr zero 4 , |
| 428 | .Xr stdin 4 , |
| 429 | .Xr stdout 4 , |
| 430 | .Xr stderr 4 , |
jmc@openbsd.org | 08c0eeb | 2014-11-22 19:21:03 +0000 | [diff] [blame] | 431 | and |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 432 | .Xr tty 4 |
| 433 | devices. |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 434 | For file transfer sessions using SFTP |
| 435 | no additional configuration of the environment is necessary if the in-process |
| 436 | sftp-server is used, |
Damien Miller | 426117b | 2014-07-30 12:33:20 +1000 | [diff] [blame] | 437 | though sessions which use logging may require |
Darren Tucker | 00fcd71 | 2009-06-21 17:56:00 +1000 | [diff] [blame] | 438 | .Pa /dev/log |
Damien Miller | 426117b | 2014-07-30 12:33:20 +1000 | [diff] [blame] | 439 | inside the chroot directory on some operating systems (see |
Darren Tucker | 00fcd71 | 2009-06-21 17:56:00 +1000 | [diff] [blame] | 440 | .Xr sftp-server 8 |
| 441 | for details). |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 442 | .Pp |
jmc@openbsd.org | a5a3e33 | 2015-01-22 21:00:42 +0000 | [diff] [blame] | 443 | For safety, it is very important that the directory hierarchy be |
deraadt@openbsd.org | dcff581 | 2015-01-22 20:24:41 +0000 | [diff] [blame] | 444 | prevented from modification by other processes on the system (especially |
| 445 | those outside the jail). |
| 446 | Misconfiguration can lead to unsafe environments which |
| 447 | .Xr sshd 8 |
| 448 | cannot detect. |
| 449 | .Pp |
djm@openbsd.org | 9fd0468 | 2015-11-13 04:38:06 +0000 | [diff] [blame] | 450 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 451 | .Cm none , |
djm@openbsd.org | 9fd0468 | 2015-11-13 04:38:06 +0000 | [diff] [blame] | 452 | indicating not to |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 453 | .Xr chroot 2 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 454 | .It Cm Ciphers |
jmc@openbsd.org | a685ae8 | 2016-02-17 07:38:19 +0000 | [diff] [blame] | 455 | Specifies the ciphers allowed. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 456 | Multiple ciphers must be comma-separated. |
djm@openbsd.org | f9eca24 | 2015-07-30 00:01:34 +0000 | [diff] [blame] | 457 | If the specified value begins with a |
| 458 | .Sq + |
| 459 | character, then the specified ciphers will be appended to the default set |
| 460 | instead of replacing them. |
djm@openbsd.org | 68bc8cf | 2017-02-03 23:01:19 +0000 | [diff] [blame] | 461 | If the specified value begins with a |
| 462 | .Sq - |
| 463 | character, then the specified ciphers (including wildcards) will be removed |
| 464 | from the default set instead of replacing them. |
djm@openbsd.org | f9eca24 | 2015-07-30 00:01:34 +0000 | [diff] [blame] | 465 | .Pp |
Damien Miller | 0fde8ac | 2013-11-21 14:12:23 +1100 | [diff] [blame] | 466 | The supported ciphers are: |
| 467 | .Pp |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 468 | .Bl -item -compact -offset indent |
| 469 | .It |
| 470 | 3des-cbc |
| 471 | .It |
| 472 | aes128-cbc |
| 473 | .It |
| 474 | aes192-cbc |
| 475 | .It |
| 476 | aes256-cbc |
| 477 | .It |
| 478 | aes128-ctr |
| 479 | .It |
| 480 | aes192-ctr |
| 481 | .It |
| 482 | aes256-ctr |
| 483 | .It |
| 484 | aes128-gcm@openssh.com |
| 485 | .It |
| 486 | aes256-gcm@openssh.com |
| 487 | .It |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 488 | chacha20-poly1305@openssh.com |
| 489 | .El |
Damien Miller | 0fde8ac | 2013-11-21 14:12:23 +1100 | [diff] [blame] | 490 | .Pp |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 491 | The default is: |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 492 | .Bd -literal -offset indent |
jmc@openbsd.org | 1f8d3d6 | 2015-08-14 15:32:41 +0000 | [diff] [blame] | 493 | chacha20-poly1305@openssh.com, |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 494 | aes128-ctr,aes192-ctr,aes256-ctr, |
jmc@openbsd.org | 1f8d3d6 | 2015-08-14 15:32:41 +0000 | [diff] [blame] | 495 | aes128-gcm@openssh.com,aes256-gcm@openssh.com |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 496 | .Ed |
Damien Miller | 0fde8ac | 2013-11-21 14:12:23 +1100 | [diff] [blame] | 497 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 498 | The list of available ciphers may also be obtained using |
| 499 | .Qq ssh -Q cipher . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 500 | .It Cm ClientAliveCountMax |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 501 | Sets the number of client alive messages which may be sent without |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 502 | .Xr sshd 8 |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 503 | receiving any messages back from the client. |
| 504 | If this threshold is reached while client alive messages are being sent, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 505 | sshd will disconnect the client, terminating the session. |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 506 | It is important to note that the use of client alive messages is very |
| 507 | different from |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 508 | .Cm TCPKeepAlive . |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 509 | The client alive messages are sent through the encrypted channel |
| 510 | and therefore will not be spoofable. |
| 511 | The TCP keepalive option enabled by |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 512 | .Cm TCPKeepAlive |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 513 | is spoofable. |
| 514 | The client alive mechanism is valuable when the client or |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 515 | server depend on knowing when a connection has become inactive. |
| 516 | .Pp |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 517 | The default value is 3. |
| 518 | If |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 519 | .Cm ClientAliveInterval |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 520 | is set to 15, and |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 521 | .Cm ClientAliveCountMax |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 522 | is left at the default, unresponsive SSH clients |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 523 | will be disconnected after approximately 45 seconds. |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 524 | .It Cm ClientAliveInterval |
| 525 | Sets a timeout interval in seconds after which if no data has been received |
| 526 | from the client, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 527 | .Xr sshd 8 |
Damien Miller | 1594ad5 | 2005-05-26 12:12:19 +1000 | [diff] [blame] | 528 | will send a message through the encrypted |
| 529 | channel to request a response from the client. |
| 530 | The default |
| 531 | is 0, indicating that these messages will not be sent to the client. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 532 | .It Cm Compression |
djm@openbsd.org | 4577ade | 2016-09-28 20:32:42 +0000 | [diff] [blame] | 533 | Specifies whether compression is enabled after |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 534 | the user has authenticated successfully. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 535 | The argument must be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 536 | .Cm yes , |
| 537 | .Cm delayed |
djm@openbsd.org | 4577ade | 2016-09-28 20:32:42 +0000 | [diff] [blame] | 538 | (a legacy synonym for |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 539 | .Cm yes ) |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 540 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 541 | .Cm no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 542 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 543 | .Cm yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 544 | .It Cm DenyGroups |
| 545 | This keyword can be followed by a list of group name patterns, separated |
| 546 | by spaces. |
| 547 | Login is disallowed for users whose primary group or supplementary |
| 548 | group list matches one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 549 | Only group names are valid; a numerical group ID is not recognized. |
| 550 | By default, login is allowed for all groups. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 551 | The allow/deny directives are processed in the following order: |
| 552 | .Cm DenyUsers , |
| 553 | .Cm AllowUsers , |
| 554 | .Cm DenyGroups , |
| 555 | and finally |
| 556 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 557 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 558 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 559 | .Xr ssh_config 5 |
| 560 | for more information on patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 561 | .It Cm DenyUsers |
| 562 | This keyword can be followed by a list of user name patterns, separated |
| 563 | by spaces. |
| 564 | Login is disallowed for user names that match one of the patterns. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 565 | Only user names are valid; a numerical user ID is not recognized. |
| 566 | By default, login is allowed for all users. |
| 567 | If the pattern takes the form USER@HOST then USER and HOST |
| 568 | are separately checked, restricting logins to particular |
| 569 | users from particular hosts. |
jmc@openbsd.org | ee1e0a1 | 2016-04-27 13:53:48 +0000 | [diff] [blame] | 570 | HOST criteria may additionally contain addresses to match in CIDR |
| 571 | address/masklen format. |
Damien Miller | ac73e51 | 2006-03-15 11:58:49 +1100 | [diff] [blame] | 572 | The allow/deny directives are processed in the following order: |
| 573 | .Cm DenyUsers , |
| 574 | .Cm AllowUsers , |
| 575 | .Cm DenyGroups , |
| 576 | and finally |
| 577 | .Cm AllowGroups . |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 578 | .Pp |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 579 | See PATTERNS in |
Damien Miller | 0c2079d | 2006-03-15 11:54:21 +1100 | [diff] [blame] | 580 | .Xr ssh_config 5 |
| 581 | for more information on patterns. |
djm@openbsd.org | 7844f35 | 2016-11-30 03:00:05 +0000 | [diff] [blame] | 582 | .It Cm DisableForwarding |
| 583 | Disables all forwarding features, including X11, |
| 584 | .Xr ssh-agent 1 , |
| 585 | TCP and StreamLocal. |
| 586 | This option overrides all other forwarding-related options and may |
| 587 | simplify restricted configurations. |
djm@openbsd.org | 8f57495 | 2017-06-24 06:34:38 +0000 | [diff] [blame] | 588 | .It Cm ExposeAuthInfo |
jmc@openbsd.org | 5fa1407 | 2017-09-27 06:45:53 +0000 | [diff] [blame] | 589 | Writes a temporary file containing a list of authentication methods and |
djm@openbsd.org | 8f57495 | 2017-06-24 06:34:38 +0000 | [diff] [blame] | 590 | public credentials (e.g. keys) used to authenticate the user. |
jmc@openbsd.org | 4096219 | 2017-06-24 06:57:04 +0000 | [diff] [blame] | 591 | The location of the file is exposed to the user session through the |
djm@openbsd.org | f17ee61 | 2017-06-24 07:08:57 +0000 | [diff] [blame] | 592 | .Ev SSH_USER_AUTH |
jmc@openbsd.org | 4096219 | 2017-06-24 06:57:04 +0000 | [diff] [blame] | 593 | environment variable. |
jmc@openbsd.org | 5fa1407 | 2017-09-27 06:45:53 +0000 | [diff] [blame] | 594 | The default is |
| 595 | .Cm no . |
djm@openbsd.org | 56d1c83 | 2014-12-21 22:27:55 +0000 | [diff] [blame] | 596 | .It Cm FingerprintHash |
| 597 | Specifies the hash algorithm used when logging key fingerprints. |
| 598 | Valid options are: |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 599 | .Cm md5 |
djm@openbsd.org | 56d1c83 | 2014-12-21 22:27:55 +0000 | [diff] [blame] | 600 | and |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 601 | .Cm sha256 . |
djm@openbsd.org | 56d1c83 | 2014-12-21 22:27:55 +0000 | [diff] [blame] | 602 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 603 | .Cm sha256 . |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 604 | .It Cm ForceCommand |
| 605 | Forces the execution of the command specified by |
| 606 | .Cm ForceCommand , |
Damien Miller | a1b48cc | 2008-03-27 11:02:02 +1100 | [diff] [blame] | 607 | ignoring any command supplied by the client and |
| 608 | .Pa ~/.ssh/rc |
| 609 | if present. |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 610 | The command is invoked by using the user's login shell with the -c option. |
| 611 | This applies to shell, command, or subsystem execution. |
| 612 | It is most useful inside a |
| 613 | .Cm Match |
| 614 | block. |
| 615 | The command originally supplied by the client is available in the |
| 616 | .Ev SSH_ORIGINAL_COMMAND |
| 617 | environment variable. |
Damien Miller | cdb6e65 | 2008-02-10 22:47:24 +1100 | [diff] [blame] | 618 | Specifying a command of |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 619 | .Cm internal-sftp |
| 620 | will force the use of an in-process SFTP server that requires no support |
Damien Miller | cdb6e65 | 2008-02-10 22:47:24 +1100 | [diff] [blame] | 621 | files when used with |
| 622 | .Cm ChrootDirectory . |
djm@openbsd.org | 9fd0468 | 2015-11-13 04:38:06 +0000 | [diff] [blame] | 623 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 624 | .Cm none . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 625 | .It Cm GatewayPorts |
| 626 | Specifies whether remote hosts are allowed to connect to ports |
| 627 | forwarded for the client. |
| 628 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 629 | .Xr sshd 8 |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 630 | binds remote port forwardings to the loopback address. |
| 631 | This prevents other remote hosts from connecting to forwarded ports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 632 | .Cm GatewayPorts |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 633 | can be used to specify that sshd |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 634 | should allow remote port forwardings to bind to non-loopback addresses, thus |
| 635 | allowing other hosts to connect. |
| 636 | The argument may be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 637 | .Cm no |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 638 | to force remote port forwardings to be available to the local host only, |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 639 | .Cm yes |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 640 | to force remote port forwardings to bind to the wildcard address, or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 641 | .Cm clientspecified |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 642 | 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] | 643 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 644 | .Cm no . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 645 | .It Cm GSSAPIAuthentication |
Damien Miller | 9b7b03b | 2003-09-02 22:57:05 +1000 | [diff] [blame] | 646 | Specifies whether user authentication based on GSSAPI is allowed. |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 647 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 648 | .Cm no . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 649 | .It Cm GSSAPICleanupCredentials |
| 650 | Specifies whether to automatically destroy the user's credentials cache |
| 651 | on logout. |
| 652 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 653 | .Cm yes . |
djm@openbsd.org | d7c31da | 2015-05-22 03:50:02 +0000 | [diff] [blame] | 654 | .It Cm GSSAPIStrictAcceptorCheck |
| 655 | Determines whether to be strict about the identity of the GSSAPI acceptor |
| 656 | a client authenticates against. |
| 657 | If set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 658 | .Cm yes |
| 659 | then the client must authenticate against the host |
djm@openbsd.org | d7c31da | 2015-05-22 03:50:02 +0000 | [diff] [blame] | 660 | service on the current hostname. |
| 661 | If set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 662 | .Cm no |
djm@openbsd.org | d7c31da | 2015-05-22 03:50:02 +0000 | [diff] [blame] | 663 | then the client may authenticate against any service key stored in the |
| 664 | machine's default store. |
| 665 | This facility is provided to assist with operation on multi homed machines. |
| 666 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 667 | .Cm yes . |
djm@openbsd.org | 1f729f0 | 2015-01-13 07:39:19 +0000 | [diff] [blame] | 668 | .It Cm HostbasedAcceptedKeyTypes |
| 669 | Specifies the key types that will be accepted for hostbased authentication |
djm@openbsd.org | 312d2f2 | 2018-07-04 13:49:31 +0000 | [diff] [blame] | 670 | as a list of comma-separated patterns. |
djm@openbsd.org | f9eca24 | 2015-07-30 00:01:34 +0000 | [diff] [blame] | 671 | Alternately if the specified value begins with a |
| 672 | .Sq + |
| 673 | character, then the specified key types will be appended to the default set |
| 674 | instead of replacing them. |
djm@openbsd.org | 68bc8cf | 2017-02-03 23:01:19 +0000 | [diff] [blame] | 675 | If the specified value begins with a |
| 676 | .Sq - |
| 677 | character, then the specified key types (including wildcards) will be removed |
| 678 | from the default set instead of replacing them. |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 679 | The default for this option is: |
| 680 | .Bd -literal -offset 3n |
| 681 | ecdsa-sha2-nistp256-cert-v01@openssh.com, |
| 682 | ecdsa-sha2-nistp384-cert-v01@openssh.com, |
| 683 | ecdsa-sha2-nistp521-cert-v01@openssh.com, |
| 684 | ssh-ed25519-cert-v01@openssh.com, |
djm@openbsd.org | 4ba0d54 | 2018-07-03 11:39:54 +0000 | [diff] [blame] | 685 | rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com, |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 686 | ssh-rsa-cert-v01@openssh.com, |
| 687 | ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
djm@openbsd.org | 4ba0d54 | 2018-07-03 11:39:54 +0000 | [diff] [blame] | 688 | ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 689 | .Ed |
| 690 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 691 | The list of available key types may also be obtained using |
| 692 | .Qq ssh -Q key . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 693 | .It Cm HostbasedAuthentication |
| 694 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
| 695 | with successful public key client host authentication is allowed |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame] | 696 | (host-based authentication). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 697 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 698 | .Cm no . |
Damien Miller | b594f38 | 2006-08-30 11:06:34 +1000 | [diff] [blame] | 699 | .It Cm HostbasedUsesNameFromPacketOnly |
| 700 | Specifies whether or not the server will attempt to perform a reverse |
| 701 | name lookup when matching the name in the |
| 702 | .Pa ~/.shosts , |
| 703 | .Pa ~/.rhosts , |
| 704 | and |
| 705 | .Pa /etc/hosts.equiv |
| 706 | files during |
| 707 | .Cm HostbasedAuthentication . |
| 708 | A setting of |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 709 | .Cm yes |
Damien Miller | b594f38 | 2006-08-30 11:06:34 +1000 | [diff] [blame] | 710 | means that |
| 711 | .Xr sshd 8 |
| 712 | uses the name supplied by the client rather than |
| 713 | attempting to resolve the name from the TCP connection itself. |
| 714 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 715 | .Cm no . |
Damien Miller | 0a80ca1 | 2010-02-27 07:55:05 +1100 | [diff] [blame] | 716 | .It Cm HostCertificate |
| 717 | Specifies a file containing a public host certificate. |
| 718 | The certificate's public key must match a private host key already specified |
| 719 | by |
| 720 | .Cm HostKey . |
| 721 | The default behaviour of |
| 722 | .Xr sshd 8 |
| 723 | is not to load any certificates. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 724 | .It Cm HostKey |
| 725 | Specifies a file containing a private host key |
| 726 | used by SSH. |
naddy@openbsd.org | ffe6549 | 2016-08-15 12:32:04 +0000 | [diff] [blame] | 727 | The defaults are |
Damien Miller | 8ba0ead | 2013-12-18 17:46:27 +1100 | [diff] [blame] | 728 | .Pa /etc/ssh/ssh_host_ecdsa_key , |
| 729 | .Pa /etc/ssh/ssh_host_ed25519_key |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 730 | and |
naddy@openbsd.org | ffe6549 | 2016-08-15 12:32:04 +0000 | [diff] [blame] | 731 | .Pa /etc/ssh/ssh_host_rsa_key . |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 732 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 733 | Note that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 734 | .Xr sshd 8 |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 735 | will refuse to use a file if it is group/world-accessible |
| 736 | and that the |
| 737 | .Cm HostKeyAlgorithms |
| 738 | option restricts which of the keys are actually used by |
| 739 | .Xr sshd 8 . |
| 740 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 741 | It is possible to have multiple host key files. |
Damien Miller | 85b45e0 | 2013-07-20 13:21:52 +1000 | [diff] [blame] | 742 | It is also possible to specify public host key files instead. |
| 743 | In this case operations on the private key will be delegated |
| 744 | to an |
| 745 | .Xr ssh-agent 1 . |
| 746 | .It Cm HostKeyAgent |
| 747 | Identifies the UNIX-domain socket used to communicate |
| 748 | with an agent that has access to the private host keys. |
markus@openbsd.org | 1a75d14 | 2016-05-04 14:29:58 +0000 | [diff] [blame] | 749 | If the string |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 750 | .Qq SSH_AUTH_SOCK |
Damien Miller | 85b45e0 | 2013-07-20 13:21:52 +1000 | [diff] [blame] | 751 | is specified, the location of the socket will be read from the |
| 752 | .Ev SSH_AUTH_SOCK |
| 753 | environment variable. |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 754 | .It Cm HostKeyAlgorithms |
jmc@openbsd.org | a685ae8 | 2016-02-17 07:38:19 +0000 | [diff] [blame] | 755 | Specifies the host key algorithms |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 756 | that the server offers. |
| 757 | The default for this option is: |
| 758 | .Bd -literal -offset 3n |
| 759 | ecdsa-sha2-nistp256-cert-v01@openssh.com, |
| 760 | ecdsa-sha2-nistp384-cert-v01@openssh.com, |
| 761 | ecdsa-sha2-nistp521-cert-v01@openssh.com, |
| 762 | ssh-ed25519-cert-v01@openssh.com, |
djm@openbsd.org | 4ba0d54 | 2018-07-03 11:39:54 +0000 | [diff] [blame] | 763 | rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com, |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 764 | ssh-rsa-cert-v01@openssh.com, |
| 765 | ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
djm@openbsd.org | 4ba0d54 | 2018-07-03 11:39:54 +0000 | [diff] [blame] | 766 | ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 767 | .Ed |
| 768 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 769 | The list of available key types may also be obtained using |
| 770 | .Qq ssh -Q key . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 771 | .It Cm IgnoreRhosts |
| 772 | Specifies that |
| 773 | .Pa .rhosts |
| 774 | and |
| 775 | .Pa .shosts |
| 776 | files will not be used in |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 777 | .Cm HostbasedAuthentication . |
| 778 | .Pp |
| 779 | .Pa /etc/hosts.equiv |
| 780 | and |
| 781 | .Pa /etc/shosts.equiv |
| 782 | are still used. |
| 783 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 784 | .Cm yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 785 | .It Cm IgnoreUserKnownHosts |
| 786 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 787 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 788 | should ignore the user's |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 789 | .Pa ~/.ssh/known_hosts |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 790 | during |
djm@openbsd.org | 62562ce | 2018-02-10 06:54:38 +0000 | [diff] [blame] | 791 | .Cm HostbasedAuthentication |
| 792 | and use only the system-wide known hosts file |
| 793 | .Pa /etc/ssh/known_hosts . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 794 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 795 | .Cm no . |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 796 | .It Cm IPQoS |
| 797 | Specifies the IPv4 type-of-service or DSCP class for the connection. |
| 798 | Accepted values are |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 799 | .Cm af11 , |
| 800 | .Cm af12 , |
| 801 | .Cm af13 , |
| 802 | .Cm af21 , |
| 803 | .Cm af22 , |
| 804 | .Cm af23 , |
| 805 | .Cm af31 , |
| 806 | .Cm af32 , |
| 807 | .Cm af33 , |
| 808 | .Cm af41 , |
| 809 | .Cm af42 , |
| 810 | .Cm af43 , |
| 811 | .Cm cs0 , |
| 812 | .Cm cs1 , |
| 813 | .Cm cs2 , |
| 814 | .Cm cs3 , |
| 815 | .Cm cs4 , |
| 816 | .Cm cs5 , |
| 817 | .Cm cs6 , |
| 818 | .Cm cs7 , |
| 819 | .Cm ef , |
| 820 | .Cm lowdelay , |
| 821 | .Cm throughput , |
| 822 | .Cm reliability , |
djm@openbsd.org | 51676ec | 2017-07-23 23:37:02 +0000 | [diff] [blame] | 823 | a numeric value, or |
| 824 | .Cm none |
| 825 | to use the operating system default. |
Damien Miller | 928362d | 2010-12-26 14:26:45 +1100 | [diff] [blame] | 826 | This option may take one or two arguments, separated by whitespace. |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 827 | If one argument is specified, it is used as the packet class unconditionally. |
| 828 | If two values are specified, the first is automatically selected for |
| 829 | interactive sessions and the second for non-interactive sessions. |
| 830 | The default is |
job@openbsd.org | 5ee8448 | 2018-04-04 15:12:17 +0000 | [diff] [blame] | 831 | .Cm af21 |
jmc@openbsd.org | 3e36f28 | 2018-04-08 07:36:02 +0000 | [diff] [blame] | 832 | (Low-Latency Data) |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 833 | for interactive sessions and |
job@openbsd.org | 5ee8448 | 2018-04-04 15:12:17 +0000 | [diff] [blame] | 834 | .Cm cs1 |
jmc@openbsd.org | 3e36f28 | 2018-04-08 07:36:02 +0000 | [diff] [blame] | 835 | (Lower Effort) |
Damien Miller | 0dac6fb | 2010-11-20 15:19:38 +1100 | [diff] [blame] | 836 | for non-interactive sessions. |
Damien Miller | e1e480a | 2014-02-04 11:13:17 +1100 | [diff] [blame] | 837 | .It Cm KbdInteractiveAuthentication |
| 838 | Specifies whether to allow keyboard-interactive authentication. |
| 839 | The argument to this keyword must be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 840 | .Cm yes |
Damien Miller | e1e480a | 2014-02-04 11:13:17 +1100 | [diff] [blame] | 841 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 842 | .Cm no . |
Damien Miller | e1e480a | 2014-02-04 11:13:17 +1100 | [diff] [blame] | 843 | The default is to use whatever value |
| 844 | .Cm ChallengeResponseAuthentication |
| 845 | is set to |
| 846 | (by default |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 847 | .Cm yes ) . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 848 | .It Cm KerberosAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 849 | Specifies whether the password provided by the user for |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 850 | .Cm PasswordAuthentication |
Damien Miller | 1a0c0b9 | 2003-09-02 22:51:17 +1000 | [diff] [blame] | 851 | will be validated through the Kerberos KDC. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 852 | To use this option, the server needs a |
| 853 | Kerberos servtab which allows the verification of the KDC's identity. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 854 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 855 | .Cm no . |
Damien Miller | 8448e66 | 2004-03-08 23:13:15 +1100 | [diff] [blame] | 856 | .It Cm KerberosGetAFSToken |
Darren Tucker | e2dd2d5 | 2005-10-03 18:19:06 +1000 | [diff] [blame] | 857 | 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] | 858 | an AFS token before accessing the user's home directory. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 859 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 860 | .Cm no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 861 | .It Cm KerberosOrLocalPasswd |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 862 | If password authentication through Kerberos fails then |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 863 | the password will be validated via any additional local mechanism |
| 864 | such as |
| 865 | .Pa /etc/passwd . |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 866 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 867 | .Cm yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 868 | .It Cm KerberosTicketCleanup |
| 869 | Specifies whether to automatically destroy the user's ticket cache |
| 870 | file on logout. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 871 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 872 | .Cm yes . |
Damien Miller | d5f62bf | 2010-09-24 22:11:14 +1000 | [diff] [blame] | 873 | .It Cm KexAlgorithms |
| 874 | Specifies the available KEX (Key Exchange) algorithms. |
| 875 | Multiple algorithms must be comma-separated. |
djm@openbsd.org | f9eca24 | 2015-07-30 00:01:34 +0000 | [diff] [blame] | 876 | Alternately if the specified value begins with a |
| 877 | .Sq + |
| 878 | character, then the specified methods will be appended to the default set |
| 879 | instead of replacing them. |
djm@openbsd.org | 68bc8cf | 2017-02-03 23:01:19 +0000 | [diff] [blame] | 880 | If the specified value begins with a |
| 881 | .Sq - |
| 882 | character, then the specified methods (including wildcards) will be removed |
| 883 | from the default set instead of replacing them. |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 884 | The supported algorithms are: |
| 885 | .Pp |
| 886 | .Bl -item -compact -offset indent |
| 887 | .It |
djm@openbsd.org | 16277fc | 2016-09-22 17:55:13 +0000 | [diff] [blame] | 888 | curve25519-sha256 |
| 889 | .It |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 890 | curve25519-sha256@libssh.org |
| 891 | .It |
| 892 | diffie-hellman-group1-sha1 |
| 893 | .It |
| 894 | diffie-hellman-group14-sha1 |
| 895 | .It |
djm@openbsd.org | 680321f | 2018-02-16 02:40:45 +0000 | [diff] [blame] | 896 | diffie-hellman-group14-sha256 |
| 897 | .It |
| 898 | diffie-hellman-group16-sha512 |
| 899 | .It |
| 900 | diffie-hellman-group18-sha512 |
| 901 | .It |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 902 | diffie-hellman-group-exchange-sha1 |
| 903 | .It |
| 904 | diffie-hellman-group-exchange-sha256 |
| 905 | .It |
| 906 | ecdh-sha2-nistp256 |
| 907 | .It |
| 908 | ecdh-sha2-nistp384 |
| 909 | .It |
| 910 | ecdh-sha2-nistp521 |
| 911 | .El |
| 912 | .Pp |
| 913 | The default is: |
Damien Miller | 6575c3a | 2013-12-18 17:47:02 +1100 | [diff] [blame] | 914 | .Bd -literal -offset indent |
djm@openbsd.org | 16277fc | 2016-09-22 17:55:13 +0000 | [diff] [blame] | 915 | curve25519-sha256,curve25519-sha256@libssh.org, |
Damien Miller | 6575c3a | 2013-12-18 17:47:02 +1100 | [diff] [blame] | 916 | ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, |
| 917 | diffie-hellman-group-exchange-sha256, |
djm@openbsd.org | 680321f | 2018-02-16 02:40:45 +0000 | [diff] [blame] | 918 | diffie-hellman-group16-sha512,diffie-hellman-group18-sha512, |
| 919 | diffie-hellman-group14-sha256,diffie-hellman-group14-sha1 |
Damien Miller | 6575c3a | 2013-12-18 17:47:02 +1100 | [diff] [blame] | 920 | .Ed |
djm@openbsd.org | 8f6784f | 2014-12-22 09:05:17 +0000 | [diff] [blame] | 921 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 922 | The list of available key exchange algorithms may also be obtained using |
| 923 | .Qq ssh -Q kex . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 924 | .It Cm ListenAddress |
| 925 | Specifies the local addresses |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 926 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 927 | should listen on. |
| 928 | The following forms may be used: |
| 929 | .Pp |
| 930 | .Bl -item -offset indent -compact |
| 931 | .It |
| 932 | .Cm ListenAddress |
| 933 | .Sm off |
jmc@openbsd.org@openbsd.org | 7530e77 | 2017-10-25 06:18:06 +0000 | [diff] [blame] | 934 | .Ar hostname | address |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 935 | .Sm on |
jmc@openbsd.org@openbsd.org | 68d3bbb | 2017-10-26 06:44:01 +0000 | [diff] [blame] | 936 | .Op Cm rdomain Ar domain |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 937 | .It |
| 938 | .Cm ListenAddress |
| 939 | .Sm off |
jmc@openbsd.org@openbsd.org | 7530e77 | 2017-10-25 06:18:06 +0000 | [diff] [blame] | 940 | .Ar hostname : port |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 941 | .Sm on |
jmc@openbsd.org@openbsd.org | 68d3bbb | 2017-10-26 06:44:01 +0000 | [diff] [blame] | 942 | .Op Cm rdomain Ar domain |
djm@openbsd.org | acf559e | 2017-10-25 00:15:35 +0000 | [diff] [blame] | 943 | .It |
| 944 | .Cm ListenAddress |
| 945 | .Sm off |
jmc@openbsd.org@openbsd.org | 7530e77 | 2017-10-25 06:18:06 +0000 | [diff] [blame] | 946 | .Ar IPv4_address : port |
djm@openbsd.org | acf559e | 2017-10-25 00:15:35 +0000 | [diff] [blame] | 947 | .Sm on |
jmc@openbsd.org@openbsd.org | 68d3bbb | 2017-10-26 06:44:01 +0000 | [diff] [blame] | 948 | .Op Cm rdomain Ar domain |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 949 | .It |
| 950 | .Cm ListenAddress |
| 951 | .Sm off |
jmc@openbsd.org@openbsd.org | 7530e77 | 2017-10-25 06:18:06 +0000 | [diff] [blame] | 952 | .Oo Ar hostname | address Oc : Ar port |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 953 | .Sm on |
jmc@openbsd.org@openbsd.org | 68d3bbb | 2017-10-26 06:44:01 +0000 | [diff] [blame] | 954 | .Op Cm rdomain Ar domain |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 955 | .El |
| 956 | .Pp |
djm@openbsd.org | acf559e | 2017-10-25 00:15:35 +0000 | [diff] [blame] | 957 | The optional |
| 958 | .Cm rdomain |
| 959 | qualifier requests |
| 960 | .Xr sshd 8 |
| 961 | listen in an explicit routing domain. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 962 | If |
| 963 | .Ar port |
| 964 | is not specified, |
dtucker@openbsd.org | 531a57a | 2015-04-29 03:48:56 +0000 | [diff] [blame] | 965 | sshd will listen on the address and all |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 966 | .Cm Port |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 967 | options specified. |
djm@openbsd.org | acf559e | 2017-10-25 00:15:35 +0000 | [diff] [blame] | 968 | The default is to listen on all local addresses on the current default |
| 969 | routing domain. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 970 | Multiple |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 971 | .Cm ListenAddress |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 972 | options are permitted. |
djm@openbsd.org | acf559e | 2017-10-25 00:15:35 +0000 | [diff] [blame] | 973 | For more information on routing domains, see |
jmc@openbsd.org@openbsd.org | 7530e77 | 2017-10-25 06:18:06 +0000 | [diff] [blame] | 974 | .Xr rdomain 4 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 975 | .It Cm LoginGraceTime |
| 976 | The server disconnects after this time if the user has not |
| 977 | successfully logged in. |
| 978 | If the value is 0, there is no time limit. |
Damien Miller | c134863 | 2002-09-05 14:35:14 +1000 | [diff] [blame] | 979 | The default is 120 seconds. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 980 | .It Cm LogLevel |
| 981 | Gives the verbosity level that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 982 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 983 | The possible values are: |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 984 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 985 | The default is INFO. |
| 986 | DEBUG and DEBUG1 are equivalent. |
| 987 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. |
| 988 | 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] | 989 | .It Cm MACs |
| 990 | Specifies the available MAC (message authentication code) algorithms. |
jmc@openbsd.org | a685ae8 | 2016-02-17 07:38:19 +0000 | [diff] [blame] | 991 | The MAC algorithm is used for data integrity protection. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 992 | Multiple algorithms must be comma-separated. |
djm@openbsd.org | f9eca24 | 2015-07-30 00:01:34 +0000 | [diff] [blame] | 993 | If the specified value begins with a |
| 994 | .Sq + |
| 995 | character, then the specified algorithms will be appended to the default set |
| 996 | instead of replacing them. |
djm@openbsd.org | 68bc8cf | 2017-02-03 23:01:19 +0000 | [diff] [blame] | 997 | If the specified value begins with a |
| 998 | .Sq - |
| 999 | character, then the specified algorithms (including wildcards) will be removed |
| 1000 | from the default set instead of replacing them. |
djm@openbsd.org | f9eca24 | 2015-07-30 00:01:34 +0000 | [diff] [blame] | 1001 | .Pp |
Damien Miller | af43a7a | 2012-12-12 10:46:31 +1100 | [diff] [blame] | 1002 | The algorithms that contain |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1003 | .Qq -etm |
Damien Miller | af43a7a | 2012-12-12 10:46:31 +1100 | [diff] [blame] | 1004 | calculate the MAC after encryption (encrypt-then-mac). |
| 1005 | These are considered safer and their use recommended. |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 1006 | The supported MACs are: |
| 1007 | .Pp |
| 1008 | .Bl -item -compact -offset indent |
| 1009 | .It |
| 1010 | hmac-md5 |
| 1011 | .It |
| 1012 | hmac-md5-96 |
| 1013 | .It |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 1014 | hmac-sha1 |
| 1015 | .It |
| 1016 | hmac-sha1-96 |
| 1017 | .It |
| 1018 | hmac-sha2-256 |
| 1019 | .It |
| 1020 | hmac-sha2-512 |
| 1021 | .It |
| 1022 | umac-64@openssh.com |
| 1023 | .It |
| 1024 | umac-128@openssh.com |
| 1025 | .It |
| 1026 | hmac-md5-etm@openssh.com |
| 1027 | .It |
| 1028 | hmac-md5-96-etm@openssh.com |
| 1029 | .It |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 1030 | hmac-sha1-etm@openssh.com |
| 1031 | .It |
| 1032 | hmac-sha1-96-etm@openssh.com |
| 1033 | .It |
| 1034 | hmac-sha2-256-etm@openssh.com |
| 1035 | .It |
| 1036 | hmac-sha2-512-etm@openssh.com |
| 1037 | .It |
| 1038 | umac-64-etm@openssh.com |
| 1039 | .It |
| 1040 | umac-128-etm@openssh.com |
| 1041 | .El |
| 1042 | .Pp |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1043 | The default is: |
Damien Miller | 22b7b49 | 2007-06-11 14:07:12 +1000 | [diff] [blame] | 1044 | .Bd -literal -offset indent |
Damien Miller | af43a7a | 2012-12-12 10:46:31 +1100 | [diff] [blame] | 1045 | umac-64-etm@openssh.com,umac-128-etm@openssh.com, |
| 1046 | hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, |
djm@openbsd.org | e4c918a | 2016-02-11 02:56:32 +0000 | [diff] [blame] | 1047 | hmac-sha1-etm@openssh.com, |
Damien Miller | c1621c8 | 2014-04-20 13:22:46 +1000 | [diff] [blame] | 1048 | umac-64@openssh.com,umac-128@openssh.com, |
djm@openbsd.org | e4c918a | 2016-02-11 02:56:32 +0000 | [diff] [blame] | 1049 | hmac-sha2-256,hmac-sha2-512,hmac-sha1 |
Damien Miller | 22b7b49 | 2007-06-11 14:07:12 +1000 | [diff] [blame] | 1050 | .Ed |
djm@openbsd.org | 8f6784f | 2014-12-22 09:05:17 +0000 | [diff] [blame] | 1051 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1052 | The list of available MAC algorithms may also be obtained using |
| 1053 | .Qq ssh -Q mac . |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1054 | .It Cm Match |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 1055 | Introduces a conditional block. |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 1056 | If all of the criteria on the |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1057 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 1058 | line are satisfied, the keywords on the following lines override those |
| 1059 | set in the global section of the config file, until either another |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1060 | .Cm Match |
Damien Miller | 8c23403 | 2006-07-24 14:05:08 +1000 | [diff] [blame] | 1061 | line or the end of the file. |
Damien Miller | fc5d675 | 2014-02-28 10:01:28 +1100 | [diff] [blame] | 1062 | If a keyword appears in multiple |
| 1063 | .Cm Match |
sobrado@openbsd.org | 180bcb4 | 2014-08-30 16:32:25 +0000 | [diff] [blame] | 1064 | blocks that are satisfied, only the first instance of the keyword is |
Damien Miller | fc5d675 | 2014-02-28 10:01:28 +1100 | [diff] [blame] | 1065 | applied. |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 1066 | .Pp |
Damien Miller | d04f357 | 2006-07-24 13:46:50 +1000 | [diff] [blame] | 1067 | The arguments to |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1068 | .Cm Match |
Damien Miller | cf31f38 | 2013-10-24 21:02:56 +1100 | [diff] [blame] | 1069 | are one or more criteria-pattern pairs or the single token |
| 1070 | .Cm All |
| 1071 | which matches all criteria. |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1072 | The available criteria are |
| 1073 | .Cm User , |
Damien Miller | 565ca3f | 2006-08-19 00:23:15 +1000 | [diff] [blame] | 1074 | .Cm Group , |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1075 | .Cm Host , |
Darren Tucker | fbcf827 | 2012-05-19 19:37:01 +1000 | [diff] [blame] | 1076 | .Cm LocalAddress , |
| 1077 | .Cm LocalPort , |
djm@openbsd.org | 68af80e | 2017-10-25 00:19:47 +0000 | [diff] [blame] | 1078 | .Cm RDomain , |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1079 | and |
djm@openbsd.org | 68af80e | 2017-10-25 00:19:47 +0000 | [diff] [blame] | 1080 | .Cm Address |
| 1081 | (with |
| 1082 | .Cm RDomain |
| 1083 | representing the |
| 1084 | .Xr rdomain 4 |
jmc@openbsd.org | 62949c5 | 2019-03-22 20:58:34 +0000 | [diff] [blame] | 1085 | on which the connection was received). |
djm@openbsd.org | 68af80e | 2017-10-25 00:19:47 +0000 | [diff] [blame] | 1086 | .Pp |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 1087 | The match patterns may consist of single entries or comma-separated |
| 1088 | lists and may use the wildcard and negation operators described in the |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1089 | .Sx PATTERNS |
| 1090 | section of |
Darren Tucker | b06cc4a | 2008-06-10 22:59:53 +1000 | [diff] [blame] | 1091 | .Xr ssh_config 5 . |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 1092 | .Pp |
| 1093 | The patterns in an |
| 1094 | .Cm Address |
| 1095 | criteria may additionally contain addresses to match in CIDR |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1096 | address/masklen format, |
| 1097 | such as 192.0.2.0/24 or 2001:db8::/32. |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 1098 | Note that the mask length provided must be consistent with the address - |
| 1099 | 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] | 1100 | or one with bits set in this host portion of the address. |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1101 | For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. |
Darren Tucker | 7a3935d | 2008-06-10 22:59:10 +1000 | [diff] [blame] | 1102 | .Pp |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1103 | Only a subset of keywords may be used on the lines following a |
| 1104 | .Cm Match |
| 1105 | keyword. |
| 1106 | Available keywords are |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 1107 | .Cm AcceptEnv , |
Damien Miller | 1781901 | 2009-01-28 16:20:17 +1100 | [diff] [blame] | 1108 | .Cm AllowAgentForwarding , |
Damien Miller | f826850 | 2012-06-20 21:54:15 +1000 | [diff] [blame] | 1109 | .Cm AllowGroups , |
djm@openbsd.org | 18a208d | 2015-02-20 22:40:32 +0000 | [diff] [blame] | 1110 | .Cm AllowStreamLocalForwarding , |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 1111 | .Cm AllowTcpForwarding , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 1112 | .Cm AllowUsers , |
Damien Miller | a6e3f01 | 2012-11-04 23:21:40 +1100 | [diff] [blame] | 1113 | .Cm AuthenticationMethods , |
Damien Miller | 09d3e12 | 2012-10-31 08:58:58 +1100 | [diff] [blame] | 1114 | .Cm AuthorizedKeysCommand , |
| 1115 | .Cm AuthorizedKeysCommandUser , |
Damien Miller | f33580e | 2012-11-04 22:22:52 +1100 | [diff] [blame] | 1116 | .Cm AuthorizedKeysFile , |
djm@openbsd.org | b6b9108 | 2015-11-13 02:57:46 +0000 | [diff] [blame] | 1117 | .Cm AuthorizedPrincipalsCommand , |
| 1118 | .Cm AuthorizedPrincipalsCommandUser , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 1119 | .Cm AuthorizedPrincipalsFile , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 1120 | .Cm Banner , |
Damien Miller | 797e3d1 | 2008-05-19 14:27:42 +1000 | [diff] [blame] | 1121 | .Cm ChrootDirectory , |
markus@openbsd.org | f0ddede | 2016-11-23 23:14:15 +0000 | [diff] [blame] | 1122 | .Cm ClientAliveCountMax , |
| 1123 | .Cm ClientAliveInterval , |
Damien Miller | c24da77 | 2012-06-20 21:53:58 +1000 | [diff] [blame] | 1124 | .Cm DenyGroups , |
| 1125 | .Cm DenyUsers , |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 1126 | .Cm ForceCommand , |
djm@openbsd.org | 18a208d | 2015-02-20 22:40:32 +0000 | [diff] [blame] | 1127 | .Cm GatewayPorts , |
djm@openbsd.org | bd49da2 | 2015-02-20 23:46:01 +0000 | [diff] [blame] | 1128 | .Cm GSSAPIAuthentication , |
djm@openbsd.org | 1f729f0 | 2015-01-13 07:39:19 +0000 | [diff] [blame] | 1129 | .Cm HostbasedAcceptedKeyTypes , |
Damien Miller | 25434de | 2008-05-19 14:29:08 +1000 | [diff] [blame] | 1130 | .Cm HostbasedAuthentication , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 1131 | .Cm HostbasedUsesNameFromPacketOnly , |
djm@openbsd.org | 18a208d | 2015-02-20 22:40:32 +0000 | [diff] [blame] | 1132 | .Cm IPQoS , |
Darren Tucker | 1d75f22 | 2007-03-01 21:31:28 +1100 | [diff] [blame] | 1133 | .Cm KbdInteractiveAuthentication , |
Damien Miller | 5737e36 | 2007-03-06 21:21:18 +1100 | [diff] [blame] | 1134 | .Cm KerberosAuthentication , |
djm@openbsd.org | 54cd41a | 2017-05-17 01:24:17 +0000 | [diff] [blame] | 1135 | .Cm LogLevel , |
Damien Miller | 307c1d1 | 2008-06-16 07:56:20 +1000 | [diff] [blame] | 1136 | .Cm MaxAuthTries , |
Damien Miller | c62a5af | 2008-06-16 07:55:46 +1000 | [diff] [blame] | 1137 | .Cm MaxSessions , |
Darren Tucker | 1629c07 | 2007-02-19 22:25:37 +1100 | [diff] [blame] | 1138 | .Cm PasswordAuthentication , |
Damien Miller | 51bde60 | 2008-11-03 19:23:10 +1100 | [diff] [blame] | 1139 | .Cm PermitEmptyPasswords , |
djm@openbsd.org | 04df432 | 2018-06-06 18:24:00 +0000 | [diff] [blame] | 1140 | .Cm PermitListen , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 1141 | .Cm PermitOpen , |
Darren Tucker | 15f9427 | 2008-01-01 20:36:56 +1100 | [diff] [blame] | 1142 | .Cm PermitRootLogin , |
Damien Miller | 5ff30c6 | 2013-10-30 22:21:50 +1100 | [diff] [blame] | 1143 | .Cm PermitTTY , |
Damien Miller | ab6de35 | 2010-06-26 09:38:45 +1000 | [diff] [blame] | 1144 | .Cm PermitTunnel , |
Damien Miller | 72e6b5c | 2014-07-04 09:00:04 +1000 | [diff] [blame] | 1145 | .Cm PermitUserRC , |
djm@openbsd.org | 1f729f0 | 2015-01-13 07:39:19 +0000 | [diff] [blame] | 1146 | .Cm PubkeyAcceptedKeyTypes , |
Darren Tucker | 1477ea1 | 2009-10-07 08:36:05 +1100 | [diff] [blame] | 1147 | .Cm PubkeyAuthentication , |
djm@openbsd.org | 18a208d | 2015-02-20 22:40:32 +0000 | [diff] [blame] | 1148 | .Cm RekeyLimit , |
| 1149 | .Cm RevokedKeys , |
djm@openbsd.org | 35eb33f | 2017-10-25 00:17:08 +0000 | [diff] [blame] | 1150 | .Cm RDomain , |
djm@openbsd.org | 2801375 | 2018-06-09 03:03:10 +0000 | [diff] [blame] | 1151 | .Cm SetEnv , |
djm@openbsd.org | 18a208d | 2015-02-20 22:40:32 +0000 | [diff] [blame] | 1152 | .Cm StreamLocalBindMask , |
| 1153 | .Cm StreamLocalBindUnlink , |
| 1154 | .Cm TrustedUserCAKeys , |
Damien Miller | d1de995 | 2006-07-24 14:05:48 +1000 | [diff] [blame] | 1155 | .Cm X11DisplayOffset , |
Damien Miller | 1991384 | 2009-02-23 10:53:58 +1100 | [diff] [blame] | 1156 | .Cm X11Forwarding |
Darren Tucker | 4515047 | 2006-07-12 22:34:17 +1000 | [diff] [blame] | 1157 | and |
Damien Miller | 0296ae8 | 2009-02-23 11:00:24 +1100 | [diff] [blame] | 1158 | .Cm X11UseLocalHost . |
Darren Tucker | 89413db | 2004-05-24 10:36:23 +1000 | [diff] [blame] | 1159 | .It Cm MaxAuthTries |
| 1160 | Specifies the maximum number of authentication attempts permitted per |
Damien Miller | 26213e5 | 2004-06-30 22:39:34 +1000 | [diff] [blame] | 1161 | connection. |
| 1162 | Once the number of failures reaches half this value, |
| 1163 | additional failures are logged. |
| 1164 | The default is 6. |
Damien Miller | 7207f64 | 2008-05-19 15:34:50 +1000 | [diff] [blame] | 1165 | .It Cm MaxSessions |
djm@openbsd.org | cac3b66 | 2016-02-05 02:37:56 +0000 | [diff] [blame] | 1166 | Specifies the maximum number of open shell, login or subsystem (e.g. sftp) |
| 1167 | sessions permitted per network connection. |
| 1168 | Multiple sessions may be established by clients that support connection |
| 1169 | multiplexing. |
| 1170 | Setting |
| 1171 | .Cm MaxSessions |
| 1172 | to 1 will effectively disable session multiplexing, whereas setting it to 0 |
| 1173 | will prevent all shell, login and subsystem sessions while still permitting |
| 1174 | forwarding. |
Damien Miller | 7207f64 | 2008-05-19 15:34:50 +1000 | [diff] [blame] | 1175 | The default is 10. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1176 | .It Cm MaxStartups |
| 1177 | Specifies the maximum number of concurrent unauthenticated connections to the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1178 | SSH daemon. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1179 | Additional connections will be dropped until authentication succeeds or the |
| 1180 | .Cm LoginGraceTime |
| 1181 | expires for a connection. |
Damien Miller | 1f583df | 2013-02-12 11:02:08 +1100 | [diff] [blame] | 1182 | The default is 10:30:100. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1183 | .Pp |
| 1184 | Alternatively, random early drop can be enabled by specifying |
| 1185 | the three colon separated values |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1186 | start:rate:full (e.g. "10:30:60"). |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1187 | .Xr sshd 8 |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1188 | will refuse connection attempts with a probability of rate/100 (30%) |
| 1189 | if there are currently start (10) unauthenticated connections. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1190 | The probability increases linearly and all connection attempts |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1191 | are refused if the number of unauthenticated connections reaches full (60). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1192 | .It Cm PasswordAuthentication |
| 1193 | Specifies whether password authentication is allowed. |
| 1194 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1195 | .Cm yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1196 | .It Cm PermitEmptyPasswords |
| 1197 | When password authentication is allowed, it specifies whether the |
| 1198 | server allows login to accounts with empty password strings. |
| 1199 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1200 | .Cm no . |
djm@openbsd.org | 04df432 | 2018-06-06 18:24:00 +0000 | [diff] [blame] | 1201 | .It Cm PermitListen |
| 1202 | Specifies the addresses/ports on which a remote TCP port forwarding may listen. |
| 1203 | The listen specification must be one of the following forms: |
| 1204 | .Pp |
| 1205 | .Bl -item -offset indent -compact |
| 1206 | .It |
| 1207 | .Cm PermitListen |
| 1208 | .Sm off |
djm@openbsd.org | 87ddd67 | 2018-06-19 02:59:41 +0000 | [diff] [blame] | 1209 | .Ar port |
| 1210 | .Sm on |
| 1211 | .It |
| 1212 | .Cm PermitListen |
| 1213 | .Sm off |
djm@openbsd.org | 04df432 | 2018-06-06 18:24:00 +0000 | [diff] [blame] | 1214 | .Ar host : port |
| 1215 | .Sm on |
djm@openbsd.org | 04df432 | 2018-06-06 18:24:00 +0000 | [diff] [blame] | 1216 | .El |
| 1217 | .Pp |
| 1218 | Multiple permissions may be specified by separating them with whitespace. |
| 1219 | An argument of |
| 1220 | .Cm any |
| 1221 | can be used to remove all restrictions and permit any listen requests. |
| 1222 | An argument of |
| 1223 | .Cm none |
| 1224 | can be used to prohibit all listen requests. |
| 1225 | The host name may contain wildcards as described in the PATTERNS section in |
| 1226 | .Xr ssh_config 5 . |
| 1227 | The wildcard |
| 1228 | .Sq * |
| 1229 | can also be used in place of a port number to allow all ports. |
| 1230 | By default all port forwarding listen requests are permitted. |
jmc@openbsd.org | 6ff6fda | 2018-06-07 11:26:14 +0000 | [diff] [blame] | 1231 | Note that the |
djm@openbsd.org | 04df432 | 2018-06-06 18:24:00 +0000 | [diff] [blame] | 1232 | .Cm GatewayPorts |
| 1233 | option may further restrict which addresses may be listened on. |
djm@openbsd.org | 87ddd67 | 2018-06-19 02:59:41 +0000 | [diff] [blame] | 1234 | Note also that |
| 1235 | .Xr ssh 1 |
| 1236 | will request a listen host of |
| 1237 | .Dq localhost |
dtucker@openbsd.org | 177d6c8 | 2019-01-23 20:48:52 +0000 | [diff] [blame] | 1238 | if no listen host was specifically requested, and this name is |
jmc@openbsd.org | f535ff9 | 2018-06-19 05:36:57 +0000 | [diff] [blame] | 1239 | treated differently to explicit localhost addresses of |
djm@openbsd.org | 87ddd67 | 2018-06-19 02:59:41 +0000 | [diff] [blame] | 1240 | .Dq 127.0.0.1 |
| 1241 | and |
| 1242 | .Dq ::1 . |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 1243 | .It Cm PermitOpen |
| 1244 | Specifies the destinations to which TCP port forwarding is permitted. |
| 1245 | The forwarding specification must be one of the following forms: |
| 1246 | .Pp |
| 1247 | .Bl -item -offset indent -compact |
| 1248 | .It |
| 1249 | .Cm PermitOpen |
| 1250 | .Sm off |
| 1251 | .Ar host : port |
| 1252 | .Sm on |
| 1253 | .It |
| 1254 | .Cm PermitOpen |
| 1255 | .Sm off |
| 1256 | .Ar IPv4_addr : port |
| 1257 | .Sm on |
| 1258 | .It |
| 1259 | .Cm PermitOpen |
| 1260 | .Sm off |
| 1261 | .Ar \&[ IPv6_addr \&] : port |
| 1262 | .Sm on |
| 1263 | .El |
| 1264 | .Pp |
Damien Miller | a765cf4 | 2006-07-24 14:08:13 +1000 | [diff] [blame] | 1265 | Multiple forwards may be specified by separating them with whitespace. |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 1266 | An argument of |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1267 | .Cm any |
Damien Miller | 9b439df | 2006-07-24 14:04:00 +1000 | [diff] [blame] | 1268 | can be used to remove all restrictions and permit any forwarding requests. |
Darren Tucker | ba9ea32 | 2012-05-19 19:37:33 +1000 | [diff] [blame] | 1269 | An argument of |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1270 | .Cm none |
Darren Tucker | ba9ea32 | 2012-05-19 19:37:33 +1000 | [diff] [blame] | 1271 | can be used to prohibit all forwarding requests. |
jmc@openbsd.org | 32d921c | 2016-07-19 12:59:16 +0000 | [diff] [blame] | 1272 | The wildcard |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1273 | .Sq * |
jmc@openbsd.org | 32d921c | 2016-07-19 12:59:16 +0000 | [diff] [blame] | 1274 | can be used for host or port to allow all hosts or ports, respectively. |
Damien Miller | 65bc2c4 | 2006-07-24 14:04:16 +1000 | [diff] [blame] | 1275 | By default all port forwarding requests are permitted. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1276 | .It Cm PermitRootLogin |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 1277 | Specifies whether root can log in using |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1278 | .Xr ssh 1 . |
| 1279 | The argument must be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1280 | .Cm yes , |
| 1281 | .Cm prohibit-password , |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1282 | .Cm forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1283 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1284 | .Cm no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1285 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1286 | .Cm prohibit-password . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1287 | .Pp |
| 1288 | If this option is set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1289 | .Cm prohibit-password |
jmc@openbsd.org | 071325f | 2017-10-13 16:50:45 +0000 | [diff] [blame] | 1290 | (or its deprecated alias, |
| 1291 | .Cm without-password ) , |
deraadt@openbsd.org | 1dc8d93 | 2015-08-06 14:53:21 +0000 | [diff] [blame] | 1292 | password and keyboard-interactive authentication are disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1293 | .Pp |
| 1294 | If this option is set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1295 | .Cm forced-commands-only , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1296 | root login with public key authentication will be allowed, |
| 1297 | but only if the |
| 1298 | .Ar command |
| 1299 | option has been specified |
| 1300 | (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] | 1301 | normally not allowed). |
| 1302 | All other authentication methods are disabled for root. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1303 | .Pp |
| 1304 | If this option is set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1305 | .Cm no , |
Darren Tucker | b350901 | 2005-01-20 11:01:46 +1100 | [diff] [blame] | 1306 | root is not allowed to log in. |
jmc@openbsd.org | f219fc8 | 2016-09-07 18:39:24 +0000 | [diff] [blame] | 1307 | .It Cm PermitTTY |
| 1308 | Specifies whether |
| 1309 | .Xr pty 4 |
| 1310 | allocation is permitted. |
| 1311 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1312 | .Cm yes . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 1313 | .It Cm PermitTunnel |
| 1314 | Specifies whether |
| 1315 | .Xr tun 4 |
| 1316 | device forwarding is allowed. |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 1317 | The argument must be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1318 | .Cm yes , |
| 1319 | .Cm point-to-point |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 1320 | (layer 3), |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1321 | .Cm ethernet |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 1322 | (layer 2), or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1323 | .Cm no . |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 1324 | Specifying |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1325 | .Cm yes |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 1326 | permits both |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1327 | .Cm point-to-point |
Damien Miller | 991dba4 | 2006-07-10 20:16:27 +1000 | [diff] [blame] | 1328 | and |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1329 | .Cm ethernet . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 1330 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1331 | .Cm no . |
djm@openbsd.org | 48dffd5 | 2014-09-09 09:45:36 +0000 | [diff] [blame] | 1332 | .Pp |
| 1333 | Independent of this setting, the permissions of the selected |
| 1334 | .Xr tun 4 |
| 1335 | device must allow access to the user. |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 1336 | .It Cm PermitUserEnvironment |
| 1337 | Specifies whether |
| 1338 | .Pa ~/.ssh/environment |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 1339 | and |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 1340 | .Cm environment= |
| 1341 | options in |
| 1342 | .Pa ~/.ssh/authorized_keys |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 1343 | are processed by |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1344 | .Xr sshd 8 . |
djm@openbsd.org | 95344c2 | 2018-07-03 10:59:35 +0000 | [diff] [blame] | 1345 | Valid options are |
| 1346 | .Cm yes , |
| 1347 | .Cm no |
| 1348 | or a pattern-list specifying which environment variable names to accept |
| 1349 | (for example |
| 1350 | .Qq LANG,LC_* ) . |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 1351 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1352 | .Cm no . |
Ben Lindstrom | bd9bf38 | 2002-08-20 18:54:20 +0000 | [diff] [blame] | 1353 | Enabling environment processing may enable users to bypass access |
| 1354 | restrictions in some configurations using mechanisms such as |
| 1355 | .Ev LD_PRELOAD . |
Damien Miller | 72e6b5c | 2014-07-04 09:00:04 +1000 | [diff] [blame] | 1356 | .It Cm PermitUserRC |
| 1357 | Specifies whether any |
| 1358 | .Pa ~/.ssh/rc |
| 1359 | file is executed. |
| 1360 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1361 | .Cm yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1362 | .It Cm PidFile |
Ben Lindstrom | 959de99 | 2002-06-23 00:35:25 +0000 | [diff] [blame] | 1363 | Specifies the file that contains the process ID of the |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1364 | SSH daemon, or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1365 | .Cm none |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1366 | to not write one. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1367 | The default is |
| 1368 | .Pa /var/run/sshd.pid . |
| 1369 | .It Cm Port |
| 1370 | Specifies the port number that |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1371 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1372 | listens on. |
| 1373 | The default is 22. |
| 1374 | Multiple options of this type are permitted. |
| 1375 | See also |
| 1376 | .Cm ListenAddress . |
| 1377 | .It Cm PrintLastLog |
| 1378 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1379 | .Xr sshd 8 |
Darren Tucker | 7cc5c23 | 2004-11-05 20:06:59 +1100 | [diff] [blame] | 1380 | should print the date and time of the last user login when a user logs |
| 1381 | in interactively. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1382 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1383 | .Cm yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1384 | .It Cm PrintMotd |
| 1385 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1386 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1387 | should print |
| 1388 | .Pa /etc/motd |
| 1389 | when a user logs in interactively. |
| 1390 | (On some systems it is also printed by the shell, |
| 1391 | .Pa /etc/profile , |
| 1392 | or equivalent.) |
| 1393 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1394 | .Cm yes . |
djm@openbsd.org | 1f729f0 | 2015-01-13 07:39:19 +0000 | [diff] [blame] | 1395 | .It Cm PubkeyAcceptedKeyTypes |
| 1396 | Specifies the key types that will be accepted for public key authentication |
djm@openbsd.org | 312d2f2 | 2018-07-04 13:49:31 +0000 | [diff] [blame] | 1397 | as a list of comma-separated patterns. |
djm@openbsd.org | f9eca24 | 2015-07-30 00:01:34 +0000 | [diff] [blame] | 1398 | Alternately if the specified value begins with a |
| 1399 | .Sq + |
| 1400 | character, then the specified key types will be appended to the default set |
| 1401 | instead of replacing them. |
djm@openbsd.org | 68bc8cf | 2017-02-03 23:01:19 +0000 | [diff] [blame] | 1402 | If the specified value begins with a |
| 1403 | .Sq - |
| 1404 | character, then the specified key types (including wildcards) will be removed |
| 1405 | from the default set instead of replacing them. |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 1406 | The default for this option is: |
| 1407 | .Bd -literal -offset 3n |
| 1408 | ecdsa-sha2-nistp256-cert-v01@openssh.com, |
| 1409 | ecdsa-sha2-nistp384-cert-v01@openssh.com, |
| 1410 | ecdsa-sha2-nistp521-cert-v01@openssh.com, |
| 1411 | ssh-ed25519-cert-v01@openssh.com, |
djm@openbsd.org | 4ba0d54 | 2018-07-03 11:39:54 +0000 | [diff] [blame] | 1412 | rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com, |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 1413 | ssh-rsa-cert-v01@openssh.com, |
| 1414 | ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
djm@openbsd.org | 4ba0d54 | 2018-07-03 11:39:54 +0000 | [diff] [blame] | 1415 | ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa |
markus@openbsd.org | 3a1638d | 2015-07-10 06:21:53 +0000 | [diff] [blame] | 1416 | .Ed |
| 1417 | .Pp |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1418 | The list of available key types may also be obtained using |
| 1419 | .Qq ssh -Q key . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1420 | .It Cm PubkeyAuthentication |
| 1421 | Specifies whether public key authentication is allowed. |
| 1422 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1423 | .Cm yes . |
Darren Tucker | 5f96f3b | 2013-05-16 20:29:28 +1000 | [diff] [blame] | 1424 | .It Cm RekeyLimit |
| 1425 | Specifies the maximum amount of data that may be transmitted before the |
| 1426 | session key is renegotiated, optionally followed a maximum amount of |
| 1427 | time that may pass before the session key is renegotiated. |
| 1428 | The first argument is specified in bytes and may have a suffix of |
| 1429 | .Sq K , |
| 1430 | .Sq M , |
| 1431 | or |
| 1432 | .Sq G |
| 1433 | to indicate Kilobytes, Megabytes, or Gigabytes, respectively. |
| 1434 | The default is between |
| 1435 | .Sq 1G |
| 1436 | and |
| 1437 | .Sq 4G , |
| 1438 | depending on the cipher. |
| 1439 | The optional second value is specified in seconds and may use any of the |
| 1440 | units documented in the |
| 1441 | .Sx TIME FORMATS |
Darren Tucker | 64d2294 | 2013-05-16 20:31:29 +1000 | [diff] [blame] | 1442 | section. |
Darren Tucker | 5f96f3b | 2013-05-16 20:29:28 +1000 | [diff] [blame] | 1443 | The default value for |
| 1444 | .Cm RekeyLimit |
| 1445 | is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1446 | .Cm default none , |
Darren Tucker | 5f96f3b | 2013-05-16 20:29:28 +1000 | [diff] [blame] | 1447 | which means that rekeying is performed after the cipher's default amount |
| 1448 | of data has been sent or received and no time based rekeying is done. |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1449 | .It Cm RevokedKeys |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1450 | Specifies revoked public keys file, or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1451 | .Cm none |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1452 | to not use one. |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1453 | Keys listed in this file will be refused for public key authentication. |
| 1454 | Note that if this file is not readable, then public key authentication will |
| 1455 | be refused for all users. |
Damien Miller | f3747bf | 2013-01-18 11:44:04 +1100 | [diff] [blame] | 1456 | Keys may be specified as a text file, listing one public key per line, or as |
| 1457 | an OpenSSH Key Revocation List (KRL) as generated by |
Damien Miller | 72abeb7 | 2013-01-20 22:33:44 +1100 | [diff] [blame] | 1458 | .Xr ssh-keygen 1 . |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 1459 | For more information on KRLs, see the KEY REVOCATION LISTS section in |
Damien Miller | f3747bf | 2013-01-18 11:44:04 +1100 | [diff] [blame] | 1460 | .Xr ssh-keygen 1 . |
djm@openbsd.org | 35eb33f | 2017-10-25 00:17:08 +0000 | [diff] [blame] | 1461 | .It Cm RDomain |
| 1462 | Specifies an explicit routing domain that is applied after authentication |
| 1463 | has completed. |
jmc@openbsd.org@openbsd.org | 7530e77 | 2017-10-25 06:18:06 +0000 | [diff] [blame] | 1464 | The user session, as well and any forwarded or listening IP sockets, |
| 1465 | will be bound to this |
djm@openbsd.org | 35eb33f | 2017-10-25 00:17:08 +0000 | [diff] [blame] | 1466 | .Xr rdomain 4 . |
| 1467 | If the routing domain is set to |
| 1468 | .Cm \&%D , |
jmc@openbsd.org@openbsd.org | 7530e77 | 2017-10-25 06:18:06 +0000 | [diff] [blame] | 1469 | then the domain in which the incoming connection was received will be applied. |
djm@openbsd.org | 2801375 | 2018-06-09 03:03:10 +0000 | [diff] [blame] | 1470 | .It Cm SetEnv |
| 1471 | Specifies one or more environment variables to set in child sessions started |
| 1472 | by |
| 1473 | .Xr sshd 8 |
| 1474 | as |
| 1475 | .Dq NAME=VALUE . |
| 1476 | The environment value may be quoted (e.g. if it contains whitespace |
| 1477 | characters). |
| 1478 | Environment variables set by |
| 1479 | .Cm SetEnv |
| 1480 | override the default environment and any variables specified by the user |
| 1481 | via |
| 1482 | .Cm AcceptEnv |
| 1483 | or |
| 1484 | .Cm PermitUserEnvironment . |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 1485 | .It Cm StreamLocalBindMask |
| 1486 | Sets the octal file creation mode mask |
| 1487 | .Pq umask |
| 1488 | used when creating a Unix-domain socket file for local or remote |
| 1489 | port forwarding. |
| 1490 | This option is only used for port forwarding to a Unix-domain socket file. |
| 1491 | .Pp |
| 1492 | The default value is 0177, which creates a Unix-domain socket file that is |
| 1493 | readable and writable only by the owner. |
| 1494 | Note that not all operating systems honor the file mode on Unix-domain |
| 1495 | socket files. |
| 1496 | .It Cm StreamLocalBindUnlink |
| 1497 | Specifies whether to remove an existing Unix-domain socket file for local |
| 1498 | or remote port forwarding before creating a new one. |
| 1499 | If the socket file already exists and |
| 1500 | .Cm StreamLocalBindUnlink |
| 1501 | is not enabled, |
| 1502 | .Nm sshd |
| 1503 | will be unable to forward the port to the Unix-domain socket file. |
| 1504 | This option is only used for port forwarding to a Unix-domain socket file. |
| 1505 | .Pp |
| 1506 | The argument must be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1507 | .Cm yes |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 1508 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1509 | .Cm no . |
Damien Miller | 7acefbb | 2014-07-18 14:11:24 +1000 | [diff] [blame] | 1510 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1511 | .Cm no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1512 | .It Cm StrictModes |
| 1513 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1514 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1515 | should check file modes and ownership of the |
| 1516 | user's files and home directory before accepting login. |
| 1517 | This is normally desirable because novices sometimes accidentally leave their |
| 1518 | directory or files world-writable. |
| 1519 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1520 | .Cm yes . |
Darren Tucker | f788a91 | 2010-01-08 17:06:47 +1100 | [diff] [blame] | 1521 | Note that this does not apply to |
| 1522 | .Cm ChrootDirectory , |
| 1523 | whose permissions and ownership are checked unconditionally. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1524 | .It Cm Subsystem |
Damien Miller | 208f1ed | 2006-03-15 11:56:03 +1100 | [diff] [blame] | 1525 | Configures an external subsystem (e.g. file transfer daemon). |
Damien Miller | 917f9b6 | 2006-07-10 20:36:47 +1000 | [diff] [blame] | 1526 | Arguments should be a subsystem name and a command (with optional arguments) |
| 1527 | to execute upon subsystem request. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 1528 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1529 | The command |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1530 | .Cm sftp-server |
| 1531 | implements the SFTP file transfer subsystem. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 1532 | .Pp |
| 1533 | Alternately the name |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1534 | .Cm internal-sftp |
| 1535 | implements an in-process SFTP server. |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 1536 | This may simplify configurations using |
| 1537 | .Cm ChrootDirectory |
| 1538 | to force a different filesystem root on clients. |
| 1539 | .Pp |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1540 | By default no subsystems are defined. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1541 | .It Cm SyslogFacility |
| 1542 | Gives the facility code that is used when logging messages from |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1543 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1544 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
| 1545 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. |
| 1546 | The default is AUTH. |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 1547 | .It Cm TCPKeepAlive |
| 1548 | Specifies whether the system should send TCP keepalive messages to the |
| 1549 | other side. |
| 1550 | If they are sent, death of the connection or crash of one |
| 1551 | of the machines will be properly noticed. |
| 1552 | However, this means that |
| 1553 | connections will die if the route is down temporarily, and some people |
| 1554 | find it annoying. |
| 1555 | On the other hand, if TCP keepalives are not sent, |
| 1556 | sessions may hang indefinitely on the server, leaving |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1557 | .Qq ghost |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 1558 | users and consuming server resources. |
| 1559 | .Pp |
| 1560 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1561 | .Cm yes |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 1562 | (to send TCP keepalive messages), and the server will notice |
| 1563 | if the network goes down or the client host crashes. |
| 1564 | This avoids infinitely hanging sessions. |
| 1565 | .Pp |
| 1566 | To disable TCP keepalive messages, the value should be set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1567 | .Cm no . |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1568 | .It Cm TrustedUserCAKeys |
| 1569 | Specifies a file containing public keys of certificate authorities that are |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1570 | trusted to sign user certificates for authentication, or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1571 | .Cm none |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1572 | to not use one. |
Damien Miller | 72b3382 | 2010-03-05 07:39:01 +1100 | [diff] [blame] | 1573 | Keys are listed one per line; empty lines and comments starting with |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1574 | .Ql # |
| 1575 | are allowed. |
| 1576 | If a certificate is presented for authentication and has its signing CA key |
| 1577 | listed in this file, then it may be used for authentication for any user |
| 1578 | listed in the certificate's principals list. |
| 1579 | Note that certificates that lack a list of principals will not be permitted |
| 1580 | for authentication using |
| 1581 | .Cm TrustedUserCAKeys . |
Damien Miller | fecfd11 | 2013-07-18 16:11:50 +1000 | [diff] [blame] | 1582 | For more details on certificates, see the CERTIFICATES section in |
Damien Miller | 1aed65e | 2010-03-04 21:53:35 +1100 | [diff] [blame] | 1583 | .Xr ssh-keygen 1 . |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 1584 | .It Cm UseDNS |
| 1585 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1586 | .Xr sshd 8 |
djm@openbsd.org | c63c9a6 | 2015-07-20 00:30:01 +0000 | [diff] [blame] | 1587 | should look up the remote host name, and to check that |
Damien Miller | 3a961dc | 2003-06-03 10:25:48 +1000 | [diff] [blame] | 1588 | the resolved host name for the remote IP address maps back to the |
| 1589 | very same IP address. |
djm@openbsd.org | c63c9a6 | 2015-07-20 00:30:01 +0000 | [diff] [blame] | 1590 | .Pp |
| 1591 | If this option is set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1592 | .Cm no |
djm@openbsd.org | c63c9a6 | 2015-07-20 00:30:01 +0000 | [diff] [blame] | 1593 | (the default) then only addresses and not host names may be used in |
djm@openbsd.org | 0235a5f | 2016-03-17 17:19:43 +0000 | [diff] [blame] | 1594 | .Pa ~/.ssh/authorized_keys |
djm@openbsd.org | c63c9a6 | 2015-07-20 00:30:01 +0000 | [diff] [blame] | 1595 | .Cm from |
| 1596 | and |
jmc@openbsd.org | 1f8d3d6 | 2015-08-14 15:32:41 +0000 | [diff] [blame] | 1597 | .Nm |
djm@openbsd.org | c63c9a6 | 2015-07-20 00:30:01 +0000 | [diff] [blame] | 1598 | .Cm Match |
| 1599 | .Cm Host |
| 1600 | directives. |
Damien Miller | 2e193e2 | 2003-05-14 15:13:03 +1000 | [diff] [blame] | 1601 | .It Cm UsePAM |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 1602 | Enables the Pluggable Authentication Module interface. |
| 1603 | If set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1604 | .Cm yes |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 1605 | this will enable PAM authentication using |
| 1606 | .Cm ChallengeResponseAuthentication |
Darren Tucker | a4904f7 | 2006-02-23 21:35:30 +1100 | [diff] [blame] | 1607 | and |
| 1608 | .Cm PasswordAuthentication |
| 1609 | in addition to PAM account and session module processing for all |
| 1610 | authentication types. |
Darren Tucker | 1dcff9a | 2004-05-13 16:51:40 +1000 | [diff] [blame] | 1611 | .Pp |
| 1612 | Because PAM challenge-response authentication usually serves an equivalent |
| 1613 | role to password authentication, you should disable either |
| 1614 | .Cm PasswordAuthentication |
| 1615 | or |
| 1616 | .Cm ChallengeResponseAuthentication. |
| 1617 | .Pp |
| 1618 | If |
| 1619 | .Cm UsePAM |
| 1620 | is enabled, you will not be able to run |
| 1621 | .Xr sshd 8 |
| 1622 | as a non-root user. |
| 1623 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1624 | .Cm no . |
Damien Miller | 2352881 | 2012-04-22 11:24:43 +1000 | [diff] [blame] | 1625 | .It Cm VersionAddendum |
| 1626 | Optionally specifies additional text to append to the SSH protocol banner |
| 1627 | sent by the server upon connection. |
| 1628 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1629 | .Cm none . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1630 | .It Cm X11DisplayOffset |
| 1631 | Specifies the first display number available for |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1632 | .Xr sshd 8 Ns 's |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1633 | X11 forwarding. |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1634 | This prevents sshd from interfering with real X11 servers. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1635 | The default is 10. |
| 1636 | .It Cm X11Forwarding |
| 1637 | Specifies whether X11 forwarding is permitted. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1638 | The argument must be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1639 | .Cm yes |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1640 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1641 | .Cm no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1642 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1643 | .Cm no . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1644 | .Pp |
| 1645 | When X11 forwarding is enabled, there may be additional exposure to |
| 1646 | the server and to client displays if the |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1647 | .Xr sshd 8 |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1648 | proxy display is configured to listen on the wildcard address (see |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1649 | .Cm X11UseLocalhost ) , |
| 1650 | though this is not the default. |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1651 | Additionally, the authentication spoofing and authentication data |
| 1652 | verification and substitution occur on the client side. |
| 1653 | 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] | 1654 | display server may be exposed to attack when the SSH client requests |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1655 | forwarding (see the warnings for |
| 1656 | .Cm ForwardX11 |
| 1657 | in |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1658 | .Xr ssh_config 5 ) . |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1659 | A system administrator may have a stance in which they want to |
| 1660 | protect clients that may expose themselves to attack by unwittingly |
| 1661 | requesting X11 forwarding, which can warrant a |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1662 | .Cm no |
Damien Miller | 101c4a7 | 2002-09-19 11:51:21 +1000 | [diff] [blame] | 1663 | setting. |
| 1664 | .Pp |
| 1665 | Note that disabling X11 forwarding does not prevent users from |
| 1666 | forwarding X11 traffic, as users can always install their own forwarders. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1667 | .It Cm X11UseLocalhost |
| 1668 | Specifies whether |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1669 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1670 | should bind the X11 forwarding server to the loopback address or to |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 1671 | the wildcard address. |
| 1672 | By default, |
Damien Miller | 5b0d63f | 2006-03-15 11:56:56 +1100 | [diff] [blame] | 1673 | sshd binds the forwarding server to the loopback address and sets the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1674 | hostname part of the |
| 1675 | .Ev DISPLAY |
| 1676 | environment variable to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1677 | .Cm localhost . |
Ben Lindstrom | 15b6120 | 2002-08-20 18:44:24 +0000 | [diff] [blame] | 1678 | This prevents remote hosts from connecting to the proxy display. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1679 | However, some older X11 clients may not function with this |
| 1680 | configuration. |
| 1681 | .Cm X11UseLocalhost |
| 1682 | may be set to |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1683 | .Cm no |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1684 | to specify that the forwarding server should be bound to the wildcard |
| 1685 | address. |
| 1686 | The argument must be |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1687 | .Cm yes |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1688 | or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1689 | .Cm no . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1690 | The default is |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1691 | .Cm yes . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1692 | .It Cm XAuthLocation |
Damien Miller | 05913ba | 2002-09-04 16:51:03 +1000 | [diff] [blame] | 1693 | Specifies the full pathname of the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1694 | .Xr xauth 1 |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1695 | program, or |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1696 | .Cm none |
dtucker@openbsd.org | 6cc7cfa | 2015-04-16 23:25:50 +0000 | [diff] [blame] | 1697 | to not use one. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1698 | The default is |
| 1699 | .Pa /usr/X11R6/bin/xauth . |
| 1700 | .El |
Damien Miller | e3beba2 | 2006-03-15 11:59:25 +1100 | [diff] [blame] | 1701 | .Sh TIME FORMATS |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1702 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1703 | command-line arguments and configuration file options that specify time |
| 1704 | may be expressed using a sequence of the form: |
| 1705 | .Sm off |
Ben Lindstrom | 1f8cf4f | 2002-08-20 18:43:27 +0000 | [diff] [blame] | 1706 | .Ar time Op Ar qualifier , |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1707 | .Sm on |
| 1708 | where |
| 1709 | .Ar time |
| 1710 | is a positive integer value and |
| 1711 | .Ar qualifier |
| 1712 | is one of the following: |
| 1713 | .Pp |
| 1714 | .Bl -tag -width Ds -compact -offset indent |
Damien Miller | 393821a | 2006-07-24 14:04:53 +1000 | [diff] [blame] | 1715 | .It Aq Cm none |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1716 | seconds |
| 1717 | .It Cm s | Cm S |
| 1718 | seconds |
| 1719 | .It Cm m | Cm M |
| 1720 | minutes |
| 1721 | .It Cm h | Cm H |
| 1722 | hours |
| 1723 | .It Cm d | Cm D |
| 1724 | days |
| 1725 | .It Cm w | Cm W |
| 1726 | weeks |
| 1727 | .El |
| 1728 | .Pp |
| 1729 | Each member of the sequence is added together to calculate |
| 1730 | the total time value. |
| 1731 | .Pp |
| 1732 | Time format examples: |
| 1733 | .Pp |
| 1734 | .Bl -tag -width Ds -compact -offset indent |
| 1735 | .It 600 |
| 1736 | 600 seconds (10 minutes) |
| 1737 | .It 10m |
| 1738 | 10 minutes |
| 1739 | .It 1h30m |
| 1740 | 1 hour 30 minutes (90 minutes) |
| 1741 | .El |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 1742 | .Sh TOKENS |
| 1743 | Arguments to some keywords can make use of tokens, |
| 1744 | which are expanded at runtime: |
| 1745 | .Pp |
| 1746 | .Bl -tag -width XXXX -offset indent -compact |
| 1747 | .It %% |
| 1748 | A literal |
| 1749 | .Sq % . |
djm@openbsd.org | 35eb33f | 2017-10-25 00:17:08 +0000 | [diff] [blame] | 1750 | .It \&%D |
| 1751 | The routing domain in which the incoming connection was received. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 1752 | .It %F |
| 1753 | The fingerprint of the CA key. |
| 1754 | .It %f |
| 1755 | The fingerprint of the key or certificate. |
| 1756 | .It %h |
| 1757 | The home directory of the user. |
| 1758 | .It %i |
| 1759 | The key ID in the certificate. |
| 1760 | .It %K |
| 1761 | The base64-encoded CA key. |
| 1762 | .It %k |
| 1763 | The base64-encoded key or certificate for authentication. |
| 1764 | .It %s |
| 1765 | The serial number of the certificate. |
| 1766 | .It \&%T |
| 1767 | The type of the CA key. |
| 1768 | .It %t |
| 1769 | The key or certificate type. |
jmc@openbsd.org | 2940284 | 2018-06-01 05:50:18 +0000 | [diff] [blame] | 1770 | .It \&%U |
| 1771 | The numeric user ID of the target user. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 1772 | .It %u |
| 1773 | The username. |
| 1774 | .El |
| 1775 | .Pp |
| 1776 | .Cm AuthorizedKeysCommand |
jmc@openbsd.org | e8d59fe | 2018-06-01 06:23:10 +0000 | [diff] [blame] | 1777 | accepts the tokens %%, %f, %h, %k, %t, %U, and %u. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 1778 | .Pp |
| 1779 | .Cm AuthorizedKeysFile |
jmc@openbsd.org | e8d59fe | 2018-06-01 06:23:10 +0000 | [diff] [blame] | 1780 | accepts the tokens %%, %h, %U, and %u. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 1781 | .Pp |
| 1782 | .Cm AuthorizedPrincipalsCommand |
jmc@openbsd.org | e8d59fe | 2018-06-01 06:23:10 +0000 | [diff] [blame] | 1783 | accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 1784 | .Pp |
| 1785 | .Cm AuthorizedPrincipalsFile |
jmc@openbsd.org | e8d59fe | 2018-06-01 06:23:10 +0000 | [diff] [blame] | 1786 | accepts the tokens %%, %h, %U, and %u. |
jmc@openbsd.org | de6a175 | 2016-09-22 19:19:01 +0000 | [diff] [blame] | 1787 | .Pp |
| 1788 | .Cm ChrootDirectory |
jmc@openbsd.org | e8d59fe | 2018-06-01 06:23:10 +0000 | [diff] [blame] | 1789 | accepts the tokens %%, %h, %U, and %u. |
djm@openbsd.org | 35eb33f | 2017-10-25 00:17:08 +0000 | [diff] [blame] | 1790 | .Pp |
| 1791 | .Cm RoutingDomain |
| 1792 | accepts the token %D. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1793 | .Sh FILES |
| 1794 | .Bl -tag -width Ds |
| 1795 | .It Pa /etc/ssh/sshd_config |
| 1796 | Contains configuration data for |
Damien Miller | f4f22b5 | 2006-03-15 11:57:25 +1100 | [diff] [blame] | 1797 | .Xr sshd 8 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1798 | This file should be writable by root only, but it is recommended |
| 1799 | (though not necessary) that it be world-readable. |
| 1800 | .El |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1801 | .Sh SEE ALSO |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1802 | .Xr sftp-server 8 , |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1803 | .Xr sshd 8 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1804 | .Sh AUTHORS |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1805 | .An -nosplit |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1806 | OpenSSH is a derivative of the original and free |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1807 | ssh 1.2.12 release by |
| 1808 | .An Tatu Ylonen . |
| 1809 | .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , |
| 1810 | .An Theo de Raadt |
| 1811 | and |
| 1812 | .An Dug Song |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1813 | removed many bugs, re-added newer features and |
| 1814 | created OpenSSH. |
jmc@openbsd.org | aae4dbd | 2016-10-07 14:41:52 +0000 | [diff] [blame] | 1815 | .An Markus Friedl |
| 1816 | contributed the support for SSH protocol versions 1.5 and 2.0. |
| 1817 | .An Niels Provos |
| 1818 | and |
| 1819 | .An Markus Friedl |
| 1820 | contributed support for privilege separation. |