1SSH_CONFIG(5)               BSD File Formats Manual              SSH_CONFIG(5)
2

NAME

4     ssh_config — OpenSSH SSH client configuration files
5

SYNOPSIS

7     ~/.ssh/config
8     /etc/ssh/ssh_config
9

DESCRIPTION

11     ssh(1) obtains configuration data from the following sources in the fol‐
12     lowing order:
13
14           1.   command-line options
15           2.   user's configuration file (~/.ssh/config)
16           3.   system-wide configuration file (/etc/ssh/ssh_config)
17
18     For each parameter, the first obtained value will be used.  The configu‐
19     ration files contain sections separated by “Host” specifications, and
20     that section is only applied for hosts that match one of the patterns
21     given in the specification.  The matched host name is the one given on
22     the command line.
23
24     Since the first obtained value for each parameter is used, more host-spe‐
25     cific declarations should be given near the beginning of the file, and
26     general defaults at the end.
27
28     The configuration file has the following format:
29
30     Empty lines and lines starting with ‘#’ are comments.  Otherwise a line
31     is of the format “keyword arguments”.  Configuration options may be sepa‐
32     rated by whitespace or optional whitespace and exactly one ‘=’; the lat‐
33     ter format is useful to avoid the need to quote whitespace when specify‐
34     ing configuration options using the ssh, scp, and sftp -o option.  Argu‐
35     ments may optionally be enclosed in double quotes (") in order to repre‐
36     sent arguments containing spaces.
37
38     The possible keywords and their meanings are as follows (note that key‐
39     words are case-insensitive and arguments are case-sensitive):
40
41     Host    Restricts the following declarations (up to the next Host key‐
42             word) to be only for those hosts that match one of the patterns
43             given after the keyword.  If more than one pattern is provided,
44             they should be separated by whitespace.  A single ‘*’ as a pat‐
45             tern can be used to provide global defaults for all hosts.  The
46             host is the hostname argument given on the command line (i.e. the
47             name is not converted to a canonicalized host name before match‐
48             ing).
49
50             See PATTERNS for more information on patterns.
51
52     AddressFamily
53             Specifies which address family to use when connecting.  Valid
54             arguments are “any”, “inet” (use IPv4 only), or “inet6” (use IPv6
55             only).
56
57     BatchMode
58             If set to “yes”, passphrase/password querying will be disabled.
59             This option is useful in scripts and other batch jobs where no
60             user is present to supply the password.  The argument must be
61             “yes” or “no”.  The default is “no”.
62
63     BindAddress
64             Use the specified address on the local machine as the source
65             address of the connection.  Only useful on systems with more than
66             one address.  Note that this option does not work if
67             UsePrivilegedPort is set to “yes”.
68
69     ChallengeResponseAuthentication
70             Specifies whether to use challenge-response authentication.  The
71             argument to this keyword must be “yes” or “no”.  The default is
72             “yes”.
73
74     CheckHostIP
75             If this flag is set to “yes”, ssh(1) will additionally check the
76             host IP address in the known_hosts file.  This allows ssh to
77             detect if a host key changed due to DNS spoofing.  If the option
78             is set to “no”, the check will not be executed.  The default is
79             “yes”.
80
81     Cipher  Specifies the cipher to use for encrypting the session in proto‐
82             col version 1.  Currently, “blowfish”, “3des”, and “des” are sup‐
83             ported.  des is only supported in the ssh(1) client for interop‐
84             erability with legacy protocol 1 implementations that do not sup‐
85             port the 3des cipher.  Its use is strongly discouraged due to
86             cryptographic weaknesses.  The default is “3des”.
87
88     Ciphers
89             Specifies the ciphers allowed for protocol version 2 in order of
90             preference.  Multiple ciphers must be comma-separated.  The sup‐
91             ported ciphers are “3des-cbc”, “aes128-cbc”, “aes192-cbc”,
92             “aes256-cbc”, “aes128-ctr”, “aes192-ctr”, “aes256-ctr”,
93             “arcfour128”, “arcfour256”, “arcfour”, “blowfish-cbc”, and
94             “cast128-cbc”.  The default is:
95
96                aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
97                aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
98                aes256-cbc,arcfour
99
100     ClearAllForwardings
101             Specifies that all local, remote, and dynamic port forwardings
102             specified in the configuration files or on the command line be
103             cleared.  This option is primarily useful when used from the
104             ssh(1) command line to clear port forwardings set in configura‐
105             tion files, and is automatically set by scp(1) and sftp(1).  The
106             argument must be “yes” or “no”.  The default is “no”.
107
108     Compression
109             Specifies whether to use compression.  The argument must be “yes”
110             or “no”.  The default is “no”.
111
112     CompressionLevel
113             Specifies the compression level to use if compression is enabled.
114             The argument must be an integer from 1 (fast) to 9 (slow, best).
115             The default level is 6, which is good for most applications.  The
116             meaning of the values is the same as in gzip(1).  Note that this
117             option applies to protocol version 1 only.
118
119     ConnectionAttempts
120             Specifies the number of tries (one per second) to make before
121             exiting.  The argument must be an integer.  This may be useful in
122             scripts if the connection sometimes fails.  The default is 1.
123
124     ConnectTimeout
125             Specifies the timeout (in seconds) used when connecting to the
126             SSH server, instead of using the default system TCP timeout.
127             This value is used only when the target is down or really
128             unreachable, not when it refuses the connection.
129
130     ControlMaster
131             Enables the sharing of multiple sessions over a single network
132             connection.  When set to “yes”, ssh(1) will listen for connec‐
133             tions on a control socket specified using the ControlPath argu‐
134             ment.  Additional sessions can connect to this socket using the
135             same ControlPath with ControlMaster set to “no” (the default).
136             These sessions will try to reuse the master instance's network
137             connection rather than initiating new ones, but will fall back to
138             connecting normally if the control socket does not exist, or is
139             not listening.
140
141             Setting this to “ask” will cause ssh to listen for control con‐
142             nections, but require confirmation using the SSH_ASKPASS program
143             before they are accepted (see ssh-add(1) for details).  If the
144             ControlPath cannot be opened, ssh will continue without connect‐
145             ing to a master instance.
146
147             X11 and ssh-agent(1) forwarding is supported over these multi‐
148             plexed connections, however the display and agent forwarded will
149             be the one belonging to the master connection i.e. it is not pos‐
150             sible to forward multiple displays or agents.
151
152             Two additional options allow for opportunistic multiplexing: try
153             to use a master connection but fall back to creating a new one if
154             one does not already exist.  These options are: “auto” and
155             “autoask”.  The latter requires confirmation like the “ask”
156             option.
157
158     ControlPath
159             Specify the path to the control socket used for connection shar‐
160             ing as described in the ControlMaster section above or the string
161             “none” to disable connection sharing.  In the path, ‘%l’ will be
162             substituted by the local host name, ‘%h’ will be substituted by
163             the target host name, ‘%p’ the port, and ‘%r’ by the remote login
164             username.  It is recommended that any ControlPath used for oppor‐
165             tunistic connection sharing include at least %h, %p, and %r.
166             This ensures that shared connections are uniquely identified.
167
168     DynamicForward
169             Specifies that a TCP port on the local machine be forwarded over
170             the secure channel, and the application protocol is then used to
171             determine where to connect to from the remote machine.
172
173             The argument must be [bind_address:]port.  IPv6 addresses can be
174             specified by enclosing addresses in square brackets or by using
175             an alternative syntax: [bind_address/]port.  By default, the
176             local port is bound in accordance with the GatewayPorts setting.
177             However, an explicit bind_address may be used to bind the connec‐
178             tion to a specific address.  The bind_address of “localhost”
179             indicates that the listening port be bound for local use only,
180             while an empty address or ‘*’ indicates that the port should be
181             available from all interfaces.
182
183             Currently the SOCKS4 and SOCKS5 protocols are supported, and
184             ssh(1) will act as a SOCKS server.  Multiple forwardings may be
185             specified, and additional forwardings can be given on the command
186             line.  Only the superuser can forward privileged ports.
187
188     EnableSSHKeysign
189             Setting this option to “yes” in the global client configuration
190             file /etc/ssh/ssh_config enables the use of the helper program
191             ssh-keysign(8) during HostbasedAuthentication.  The argument must
192             be “yes” or “no”.  The default is “no”.  This option should be
193             placed in the non-hostspecific section.  See ssh-keysign(8) for
194             more information.
195
196     EscapeChar
197             Sets the escape character (default: ‘~’).  The escape character
198             can also be set on the command line.  The argument should be a
199             single character, ‘^’ followed by a letter, or “none” to disable
200             the escape character entirely (making the connection transparent
201             for binary data).
202
203     ExitOnForwardFailure
204             Specifies whether ssh(1) should terminate the connection if it
205             cannot set up all requested dynamic, tunnel, local, and remote
206             port forwardings.  The argument must be “yes” or “no”.  The
207             default is “no”.
208
209     ForwardAgent
210             Specifies whether the connection to the authentication agent (if
211             any) will be forwarded to the remote machine.  The argument must
212             be “yes” or “no”.  The default is “no”.
213
214             Agent forwarding should be enabled with caution.  Users with the
215             ability to bypass file permissions on the remote host (for the
216             agent's Unix-domain socket) can access the local agent through
217             the forwarded connection.  An attacker cannot obtain key material
218             from the agent, however they can perform operations on the keys
219             that enable them to authenticate using the identities loaded into
220             the agent.
221
222     ForwardX11
223             Specifies whether X11 connections will be automatically redi‐
224             rected over the secure channel and DISPLAY set.  The argument
225             must be “yes” or “no”.  The default is “no”.
226
227             X11 forwarding should be enabled with caution.  Users with the
228             ability to bypass file permissions on the remote host (for the
229             user's X11 authorization database) can access the local X11 dis‐
230             play through the forwarded connection.  An attacker may then be
231             able to perform activities such as keystroke monitoring if the
232             ForwardX11Trusted option is also enabled.
233
234     ForwardX11Trusted
235             If this option is set to “yes”, remote X11 clients will have full
236             access to the original X11 display.
237
238             If this option is set to “no”, remote X11 clients will be consid‐
239             ered untrusted and prevented from stealing or tampering with data
240             belonging to trusted X11 clients.  Furthermore, the xauth(1)
241             token used for the session will be set to expire after 20 min‐
242             utes.  Remote clients will be refused access after this time.
243
244             The default is “no”.
245
246             See the X11 SECURITY extension specification for full details on
247             the restrictions imposed on untrusted clients.
248
249     GatewayPorts
250             Specifies whether remote hosts are allowed to connect to local
251             forwarded ports.  By default, ssh(1) binds local port forwardings
252             to the loopback address.  This prevents other remote hosts from
253             connecting to forwarded ports.  GatewayPorts can be used to spec‐
254             ify that ssh should bind local port forwardings to the wildcard
255             address, thus allowing remote hosts to connect to forwarded
256             ports.  The argument must be “yes” or “no”.  The default is “no”.
257
258     GlobalKnownHostsFile
259             Specifies a file to use for the global host key database instead
260             of /etc/ssh/ssh_known_hosts.
261
262     GSSAPIAuthentication
263             Specifies whether user authentication based on GSSAPI is allowed.
264             The default is “no”.  Note that this option applies to protocol
265             version 2 only.
266
267     GSSAPIKeyExchange
268             Specifies whether key exchange based on GSSAPI may be used. When
269             using GSSAPI key exchange the server need not have a host key.
270             The default is “no”.  Note that this option applies to protocol
271             version 2 only.
272
273     GSSAPIClientIdentity
274             If set, specifies the GSSAPI client identity that ssh should use
275             when connecting to the server. The default is unset, which means
276             that the default identity will be used.
277
278     GSSAPIDelegateCredentials
279             Forward (delegate) credentials to the server.  The default is
280             “no”.  Note that this option applies to protocol version 2 con‐
281             nections using GSSAPI.
282
283     GSSAPIRenewalForcesRekey
284             If set to “yes” then renewal of the client's GSSAPI credentials
285             will force the rekeying of the ssh connection. With a compatible
286             server, this can delegate the renewed credentials to a session on
287             the server.  The default is “no”.
288
289     GSSAPITrustDns
290             Set to “yes to indicate that the DNS is trusted to securely
291             canonicalize” the name of the host being connected to. If “no,
292             the hostname entered on the” command line will be passed
293             untouched to the GSSAPI library.  The default is “no”.  This
294             option only applies to protocol version 2 connections using GSS‐
295             API.
296
297     HashKnownHosts
298             Indicates that ssh(1) should hash host names and addresses when
299             they are added to ~/.ssh/known_hosts.  These hashed names may be
300             used normally by ssh(1) and sshd(8), but they do not reveal iden‐
301             tifying information should the file's contents be disclosed.  The
302             default is “no”.  Note that existing names and addresses in known
303             hosts files will not be converted automatically, but may be manu‐
304             ally hashed using ssh-keygen(1).
305
306     HostbasedAuthentication
307             Specifies whether to try rhosts based authentication with public
308             key authentication.  The argument must be “yes” or “no”.  The
309             default is “no”.  This option applies to protocol version 2 only
310             and is similar to RhostsRSAAuthentication.
311
312     HostKeyAlgorithms
313             Specifies the protocol version 2 host key algorithms that the
314             client wants to use in order of preference.  The default for this
315             option is: “ssh-rsa,ssh-dss”.
316
317     HostKeyAlias
318             Specifies an alias that should be used instead of the real host
319             name when looking up or saving the host key in the host key data‐
320             base files.  This option is useful for tunneling SSH connections
321             or for multiple servers running on a single host.
322
323     HostName
324             Specifies the real host name to log into.  This can be used to
325             specify nicknames or abbreviations for hosts.  The default is the
326             name given on the command line.  Numeric IP addresses are also
327             permitted (both on the command line and in HostName specifica‐
328             tions).
329
330     IdentitiesOnly
331             Specifies that ssh(1) should only use the authentication identity
332             files configured in the ssh_config files, even if ssh-agent(1)
333             offers more identities.  The argument to this keyword must be
334             “yes” or “no”.  This option is intended for situations where ssh-
335             agent offers many different identities.  The default is “no”.
336
337     IdentityFile
338             Specifies a file from which the user's RSA or DSA authentication
339             identity is read.  The default is ~/.ssh/identity for protocol
340             version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol ver‐
341             sion 2.  Additionally, any identities represented by the authen‐
342             tication agent will be used for authentication.  ssh(1) will try
343             to load certificate information from the filename obtained by
344             appending -cert.pub to the path of a specified IdentityFile.
345
346             The file name may use the tilde syntax to refer to a user's home
347             directory or one of the following escape characters: ‘%d’ (local
348             user's home directory), ‘%u’ (local user name), ‘%l’ (local host
349             name), ‘%h’ (remote host name) or ‘%r’ (remote user name).
350
351             It is possible to have multiple identity files specified in con‐
352             figuration files; all these identities will be tried in sequence.
353
354     KbdInteractiveAuthentication
355             Specifies whether to use keyboard-interactive authentication.
356             The argument to this keyword must be “yes” or “no”.  The default
357             is “yes”.
358
359     KbdInteractiveDevices
360             Specifies the list of methods to use in keyboard-interactive
361             authentication.  Multiple method names must be comma-separated.
362             The default is to use the server specified list.  The methods
363             available vary depending on what the server supports.  For an
364             OpenSSH server, it may be zero or more of: “bsdauth”, “pam”, and
365             “skey”.
366
367     LocalCommand
368             Specifies a command to execute on the local machine after suc‐
369             cessfully connecting to the server.  The command string extends
370             to the end of the line, and is executed with the user's shell.
371             The following escape character substitutions will be performed:
372             ‘%d’ (local user's home directory), ‘%h’ (remote host name), ‘%l’
373             (local host name), ‘%n’ (host name as provided on the command
374             line), ‘%p’ (remote port), ‘%r’ (remote user name) or ‘%u’ (local
375             user name).
376
377             The command is run synchronously and does not have access to the
378             session of the ssh(1) that spawned it.  It should not be used for
379             interactive commands.
380
381             This directive is ignored unless PermitLocalCommand has been
382             enabled.
383
384     LocalForward
385             Specifies that a TCP port on the local machine be forwarded over
386             the secure channel to the specified host and port from the remote
387             machine.  The first argument must be [bind_address:]port and the
388             second argument must be host:hostport.  IPv6 addresses can be
389             specified by enclosing addresses in square brackets or by using
390             an alternative syntax: [bind_address/]port and host/hostport.
391             Multiple forwardings may be specified, and additional forwardings
392             can be given on the command line.  Only the superuser can forward
393             privileged ports.  By default, the local port is bound in accor‐
394             dance with the GatewayPorts setting.  However, an explicit
395             bind_address may be used to bind the connection to a specific
396             address.  The bind_address of “localhost” indicates that the lis‐
397             tening port be bound for local use only, while an empty address
398             or ‘*’ indicates that the port should be available from all
399             interfaces.
400
401     LogLevel
402             Gives the verbosity level that is used when logging messages from
403             ssh(1).  The possible values are: QUIET, FATAL, ERROR, INFO, VER‐
404             BOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.  The default is INFO.
405             DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3 each specify
406             higher levels of verbose output.
407
408     MACs    Specifies the MAC (message authentication code) algorithms in
409             order of preference.  The MAC algorithm is used in protocol ver‐
410             sion 2 for data integrity protection.  Multiple algorithms must
411             be comma-separated.  The default is:
412
413                   hmac-md5,hmac-sha1,umac-64@openssh.com,
414                   hmac-ripemd160,hmac-sha1-96,hmac-md5-96
415
416     NoHostAuthenticationForLocalhost
417             This option can be used if the home directory is shared across
418             machines.  In this case localhost will refer to a different
419             machine on each of the machines and the user will get many warn‐
420             ings about changed host keys.  However, this option disables host
421             authentication for localhost.  The argument to this keyword must
422             be “yes” or “no”.  The default is to check the host key for
423             localhost.
424
425     NumberOfPasswordPrompts
426             Specifies the number of password prompts before giving up.  The
427             argument to this keyword must be an integer.  The default is 3.
428
429     PasswordAuthentication
430             Specifies whether to use password authentication.  The argument
431             to this keyword must be “yes” or “no”.  The default is “yes”.
432
433     PermitLocalCommand
434             Allow local command execution via the LocalCommand option or
435             using the !command escape sequence in ssh(1).  The argument must
436             be “yes” or “no”.  The default is “no”.
437
438     PKCS11Provider
439             Specifies which PKCS#11 provider to use.  The argument to this
440             keyword is the PKCS#11 shared libary ssh(1) should use to commu‐
441             nicate with a PKCS#11 token providing the user's private RSA key.
442
443     Port    Specifies the port number to connect on the remote host.  The
444             default is 22.
445
446     PreferredAuthentications
447             Specifies the order in which the client should try protocol 2
448             authentication methods.  This allows a client to prefer one
449             method (e.g. keyboard-interactive) over another method (e.g.
450             password) The default for this option is:
451             “gssapi-with-mic,hostbased,publickey,keyboard-interactive,password”.
452
453     Protocol
454             Specifies the protocol versions ssh(1) should support in order of
455             preference.  The possible values are ‘1’ and ‘2’.  Multiple ver‐
456             sions must be comma-separated.  When this option is set to “2,1”
457             ssh will try version 2 and fall back to version 1 if version 2 is
458             not available.  The default is ‘2’.
459
460     ProxyCommand
461             Specifies the command to use to connect to the server.  The com‐
462             mand string extends to the end of the line, and is executed with
463             the user's shell.  In the command string, ‘%h’ will be substi‐
464             tuted by the host name to connect and ‘%p’ by the port.  The com‐
465             mand can be basically anything, and should read from its standard
466             input and write to its standard output.  It should eventually
467             connect an sshd(8) server running on some machine, or execute
468             sshd -i somewhere.  Host key management will be done using the
469             HostName of the host being connected (defaulting to the name
470             typed by the user).  Setting the command to “none” disables this
471             option entirely.  Note that CheckHostIP is not available for con‐
472             nects with a proxy command.
473
474             This directive is useful in conjunction with nc(1) and its proxy
475             support.  For example, the following directive would connect via
476             an HTTP proxy at 192.0.2.0:
477
478                ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
479
480     PubkeyAuthentication
481             Specifies whether to try public key authentication.  The argument
482             to this keyword must be “yes” or “no”.  The default is “yes”.
483             This option applies to protocol version 2 only.
484
485     RekeyLimit
486             Specifies the maximum amount of data that may be transmitted
487             before the session key is renegotiated.  The argument is the num‐
488             ber of bytes, with an optional suffix of ‘K’, ‘M’, or ‘G’ to
489             indicate Kilobytes, Megabytes, or Gigabytes, respectively.  The
490             default is between ‘1G’ and ‘4G’, depending on the cipher.  This
491             option applies to protocol version 2 only.
492
493     RemoteForward
494             Specifies that a TCP port on the remote machine be forwarded over
495             the secure channel to the specified host and port from the local
496             machine.  The first argument must be [bind_address:]port and the
497             second argument must be host:hostport.  IPv6 addresses can be
498             specified by enclosing addresses in square brackets or by using
499             an alternative syntax: [bind_address/]port and host/hostport.
500             Multiple forwardings may be specified, and additional forwardings
501             can be given on the command line.  Privileged ports can be for‐
502             warded only when logging in as root on the remote machine.
503
504             If the port argument is ‘0’, the listen port will be dynamically
505             allocated on the server and reported to the client at run time.
506
507             If the bind_address is not specified, the default is to only bind
508             to loopback addresses.  If the bind_address is ‘*’ or an empty
509             string, then the forwarding is requested to listen on all inter‐
510             faces.  Specifying a remote bind_address will only succeed if the
511             server's GatewayPorts option is enabled (see sshd_config(5)).
512
513     RhostsRSAAuthentication
514             Specifies whether to try rhosts based authentication with RSA
515             host authentication.  The argument must be “yes” or “no”.  The
516             default is “no”.  This option applies to protocol version 1 only
517             and requires ssh(1) to be setuid root.
518
519     RSAAuthentication
520             Specifies whether to try RSA authentication.  The argument to
521             this keyword must be “yes” or “no”.  RSA authentication will only
522             be attempted if the identity file exists, or an authentication
523             agent is running.  The default is “yes”.  Note that this option
524             applies to protocol version 1 only.
525
526     SendEnv
527             Specifies what variables from the local environ(7) should be sent
528             to the server.  Note that environment passing is only supported
529             for protocol 2.  The server must also support it, and the server
530             must be configured to accept these environment variables.  Refer
531             to AcceptEnv in sshd_config(5) for how to configure the server.
532             Variables are specified by name, which may contain wildcard char‐
533             acters.  Multiple environment variables may be separated by
534             whitespace or spread across multiple SendEnv directives.  The
535             default is not to send any environment variables.
536
537             See PATTERNS for more information on patterns.
538
539     ServerAliveCountMax
540             Sets the number of server alive messages (see below) which may be
541             sent without ssh(1) receiving any messages back from the server.
542             If this threshold is reached while server alive messages are
543             being sent, ssh will disconnect from the server, terminating the
544             session.  It is important to note that the use of server alive
545             messages is very different from TCPKeepAlive (below).  The server
546             alive messages are sent through the encrypted channel and there‐
547             fore will not be spoofable.  The TCP keepalive option enabled by
548             TCPKeepAlive is spoofable.  The server alive mechanism is valu‐
549             able when the client or server depend on knowing when a connec‐
550             tion has become inactive.
551
552             The default value is 3.  If, for example, ServerAliveInterval
553             (see below) is set to 15 and ServerAliveCountMax is left at the
554             default, if the server becomes unresponsive, ssh will disconnect
555             after approximately 45 seconds.  This option applies to protocol
556             version 2 only.
557
558     ServerAliveInterval
559             Sets a timeout interval in seconds after which if no data has
560             been received from the server, ssh(1) will send a message through
561             the encrypted channel to request a response from the server.  The
562             default is 0, indicating that these messages will not be sent to
563             the server.  This option applies to protocol version 2 only.
564
565     StrictHostKeyChecking
566             If this flag is set to “yes”, ssh(1) will never automatically add
567             host keys to the ~/.ssh/known_hosts file, and refuses to connect
568             to hosts whose host key has changed.  This provides maximum pro‐
569             tection against trojan horse attacks, though it can be annoying
570             when the /etc/ssh/ssh_known_hosts file is poorly maintained or
571             when connections to new hosts are frequently made.  This option
572             forces the user to manually add all new hosts.  If this flag is
573             set to “no”, ssh will automatically add new host keys to the user
574             known hosts files.  If this flag is set to “ask”, new host keys
575             will be added to the user known host files only after the user
576             has confirmed that is what they really want to do, and ssh will
577             refuse to connect to hosts whose host key has changed.  The host
578             keys of known hosts will be verified automatically in all cases.
579             The argument must be “yes”, “no”, or “ask”.  The default is
580             “ask”.
581
582     TCPKeepAlive
583             Specifies whether the system should send TCP keepalive messages
584             to the other side.  If they are sent, death of the connection or
585             crash of one of the machines will be properly noticed.  However,
586             this means that connections will die if the route is down tempo‐
587             rarily, and some people find it annoying.
588
589             The default is “yes” (to send TCP keepalive messages), and the
590             client will notice if the network goes down or the remote host
591             dies.  This is important in scripts, and many users want it too.
592
593             To disable TCP keepalive messages, the value should be set to
594             “no”.
595
596     Tunnel  Request tun(4) device forwarding between the client and the
597             server.  The argument must be “yes”, “point-to-point” (layer 3),
598             “ethernet” (layer 2), or “no”.  Specifying “yes” requests the
599             default tunnel mode, which is “point-to-point”.  The default is
600             “no”.
601
602     TunnelDevice
603             Specifies the tun(4) devices to open on the client (local_tun)
604             and the server (remote_tun).
605
606             The argument must be local_tun[:remote_tun].  The devices may be
607             specified by numerical ID or the keyword “any”, which uses the
608             next available tunnel device.  If remote_tun is not specified, it
609             defaults to “any”.  The default is “any:any”.
610
611     UsePrivilegedPort
612             Specifies whether to use a privileged port for outgoing connec‐
613             tions.  The argument must be “yes” or “no”.  The default is “no”.
614             If set to “yes”, ssh(1) must be setuid root.  Note that this
615             option must be set to “yes” for RhostsRSAAuthentication with
616             older servers.
617
618     User    Specifies the user to log in as.  This can be useful when a dif‐
619             ferent user name is used on different machines.  This saves the
620             trouble of having to remember to give the user name on the com‐
621             mand line.
622
623     UserKnownHostsFile
624             Specifies a file to use for the user host key database instead of
625             ~/.ssh/known_hosts.
626
627     VerifyHostKeyDNS
628             Specifies whether to verify the remote key using DNS and SSHFP
629             resource records.  If this option is set to “yes”, the client
630             will implicitly trust keys that match a secure fingerprint from
631             DNS.  Insecure fingerprints will be handled as if this option was
632             set to “ask”.  If this option is set to “ask”, information on
633             fingerprint match will be displayed, but the user will still need
634             to confirm new host keys according to the StrictHostKeyChecking
635             option.  The argument must be “yes”, “no”, or “ask”.  The default
636             is “no”.  Note that this option applies to protocol version 2
637             only.
638
639             See also VERIFYING HOST KEYS in ssh(1).
640
641     VisualHostKey
642             If this flag is set to “yes”, an ASCII art representation of the
643             remote host key fingerprint is printed in addition to the hex
644             fingerprint string at login and for unknown host keys.  If this
645             flag is set to “no”, no fingerprint strings are printed at login
646             and only the hex fingerprint string will be printed for unknown
647             host keys.  The default is “no”.
648
649     XAuthLocation
650             Specifies the full pathname of the xauth(1) program.  The default
651             is /usr/bin/xauth.
652

PATTERNS

654     A pattern consists of zero or more non-whitespace characters, ‘*’ (a
655     wildcard that matches zero or more characters), or ‘?’ (a wildcard that
656     matches exactly one character).  For example, to specify a set of decla‐
657     rations for any host in the “.co.uk” set of domains, the following pat‐
658     tern could be used:
659
660           Host *.co.uk
661
662     The following pattern would match any host in the 192.168.0.[0-9] network
663     range:
664
665           Host 192.168.0.?
666
667     A pattern-list is a comma-separated list of patterns.  Patterns within
668     pattern-lists may be negated by preceding them with an exclamation mark
669     (‘!’).  For example, to allow a key to be used from anywhere within an
670     organisation except from the “dialup” pool, the following entry (in
671     authorized_keys) could be used:
672
673           from="!*.dialup.example.com,*.example.com"
674

FILES

676     ~/.ssh/config
677             This is the per-user configuration file.  The format of this file
678             is described above.  This file is used by the SSH client.
679             Because of the potential for abuse, this file must have strict
680             permissions: read/write for the user, and not accessible by oth‐
681             ers.
682
683     /etc/ssh/ssh_config
684             Systemwide configuration file.  This file provides defaults for
685             those values that are not specified in the user's configuration
686             file, and for those users who do not have a configuration file.
687             This file must be world-readable.
688

SEE ALSO

690     ssh(1)
691

AUTHORS

693     OpenSSH is a derivative of the original and free ssh 1.2.12 release by
694     Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
695     de Raadt and Dug Song removed many bugs, re-added newer features and cre‐
696     ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
697     versions 1.5 and 2.0.
698
699BSD                              June 22, 2019                             BSD
Impressum