3 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 .\" All rights reserved
7 .\" As far as I am concerned, the code I have written for this software
8 .\" can be used freely for any purpose. Any derived versions of this
9 .\" software must be clearly marked as such, and if the derived work is
10 .\" incompatible with the protocol description in the RFC file, it must be
11 .\" called by a name other than "ssh" or "Secure Shell".
13 .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14 .\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15 .\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
17 .\" Redistribution and use in source and binary forms, with or without
18 .\" modification, are permitted provided that the following conditions
20 .\" 1. Redistributions of source code must retain the above copyright
21 .\" notice, this list of conditions and the following disclaimer.
22 .\" 2. Redistributions in binary form must reproduce the above copyright
23 .\" notice, this list of conditions and the following disclaimer in the
24 .\" documentation and/or other materials provided with the distribution.
26 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 .\" $OpenBSD: ssh_config.5,v 1.1 2002/06/20 19:56:07 stevesk Exp $
38 .Dd September 25, 1999
43 .Nd OpenSSH SSH client configuration files
45 .Bl -tag -width Ds -compact
46 .It Pa $HOME/.ssh/config
47 .It Pa /etc/ssh/ssh_config
51 obtains configuration data from the following sources in
53 command line options, user's configuration file
54 .Pq Pa $HOME/.ssh/config ,
55 and system-wide configuration file
56 .Pq Pa /etc/ssh/ssh_config .
58 For each parameter, the first obtained value
60 The configuration files contain sections bracketed by
62 specifications, and that section is only applied for hosts that
63 match one of the patterns given in the specification.
64 The matched host name is the one given on the command line.
66 Since the first obtained value for each parameter is used, more
67 host-specific declarations should be given near the beginning of the
68 file, and general defaults at the end.
70 The configuration file has the following format:
72 Empty lines and lines starting with
76 Otherwise a line is of the format
77 .Dq keyword arguments .
78 Configuration options may be separated by whitespace or
79 optional whitespace and exactly one
81 the latter format is useful to avoid the need to quote whitespace
82 when specifying configuration options using the
91 keywords and their meanings are as follows (note that
92 keywords are case-insensitive and arguments are case-sensitive):
95 Restricts the following declarations (up to the next
97 keyword) to be only for those hosts that match one of the patterns
98 given after the keyword.
102 can be used as wildcards in the
106 as a pattern can be used to provide global
107 defaults for all hosts.
110 argument given on the command line (i.e., the name is not converted to
111 a canonicalized host name before matching).
112 .It Cm AFSTokenPassing
113 Specifies whether to pass AFS tokens to remote host.
114 The argument to this keyword must be
118 This option applies to protocol version 1 only.
122 passphrase/password querying will be disabled.
123 This option is useful in scripts and other batch jobs where no user
124 is present to supply the password.
132 Specify the interface to transmit from on machines with multiple
133 interfaces or aliased addresses.
134 Note that this option does not work if
135 .Cm UsePrivilegedPort
138 .It Cm ChallengeResponseAuthentication
139 Specifies whether to use challenge response authentication.
140 The argument to this keyword must be
147 If this flag is set to
149 ssh will additionally check the host IP address in the
152 This allows ssh to detect if a host key changed due to DNS spoofing.
153 If the option is set to
155 the check will not be executed.
159 Specifies the cipher to use for encrypting the session
160 in protocol version 1.
168 is only supported in the
170 client for interoperability with legacy protocol 1 implementations
171 that do not support the
173 cipher. Its use is strongly discouraged due to cryptographic
178 Specifies the ciphers allowed for protocol version 2
179 in order of preference.
180 Multiple ciphers must be comma-separated.
184 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
185 aes192-cbc,aes256-cbc''
187 .It Cm ClearAllForwardings
188 Specifies that all local, remote and dynamic port forwardings
189 specified in the configuration files or on the command line be
190 cleared. This option is primarily useful when used from the
192 command line to clear port forwardings set in
193 configuration files, and is automatically set by
204 Specifies whether to use compression.
211 .It Cm CompressionLevel
212 Specifies the compression level to use if compression is enabled.
213 The argument must be an integer from 1 (fast) to 9 (slow, best).
214 The default level is 6, which is good for most applications.
215 The meaning of the values is the same as in
217 Note that this option applies to protocol version 1 only.
218 .It Cm ConnectionAttempts
219 Specifies the number of tries (one per second) to make before exiting.
220 The argument must be an integer.
221 This may be useful in scripts if the connection sometimes fails.
223 .It Cm DynamicForward
224 Specifies that a TCP/IP port on the local machine be forwarded
225 over the secure channel, and the application
226 protocol is then used to determine where to connect to from the
227 remote machine. The argument must be a port number.
228 Currently the SOCKS4 protocol is supported, and
230 will act as a SOCKS4 server.
231 Multiple forwardings may be specified, and
232 additional forwardings can be given on the command line. Only
233 the superuser can forward privileged ports.
235 Sets the escape character (default:
237 The escape character can also
238 be set on the command line.
239 The argument should be a single character,
241 followed by a letter, or
243 to disable the escape
244 character entirely (making the connection transparent for binary
247 Specifies whether the connection to the authentication agent (if any)
248 will be forwarded to the remote machine.
256 Specifies whether X11 connections will be automatically redirected
257 over the secure channel and
267 Specifies whether remote hosts are allowed to connect to local
271 binds local port forwardings to the loopback address. This
272 prevents other remote hosts from connecting to forwarded ports.
274 can be used to specify that
276 should bind local port forwardings to the wildcard address,
277 thus allowing remote hosts to connect to forwarded ports.
284 .It Cm GlobalKnownHostsFile
285 Specifies a file to use for the global
286 host key database instead of
287 .Pa /etc/ssh/ssh_known_hosts .
288 .It Cm HostbasedAuthentication
289 Specifies whether to try rhosts based authentication with public key
297 This option applies to protocol version 2 only and
299 .Cm RhostsRSAAuthentication .
300 .It Cm HostKeyAlgorithms
301 Specifies the protocol version 2 host key algorithms
302 that the client wants to use in order of preference.
303 The default for this option is:
304 .Dq ssh-rsa,ssh-dss .
306 Specifies an alias that should be used instead of the
307 real host name when looking up or saving the host key
308 in the host key database files.
309 This option is useful for tunneling ssh connections
310 or for multiple servers running on a single host.
312 Specifies the real host name to log into.
313 This can be used to specify nicknames or abbreviations for hosts.
314 Default is the name given on the command line.
315 Numeric IP addresses are also permitted (both on the command line and in
319 Specifies a file from which the user's RSA or DSA authentication identity
320 is read. The default is
321 .Pa $HOME/.ssh/identity
322 for protocol version 1, and
323 .Pa $HOME/.ssh/id_rsa
325 .Pa $HOME/.ssh/id_dsa
326 for protocol version 2.
327 Additionally, any identities represented by the authentication agent
328 will be used for authentication.
329 The file name may use the tilde
330 syntax to refer to a user's home directory.
331 It is possible to have
332 multiple identity files specified in configuration files; all these
333 identities will be tried in sequence.
335 Specifies whether the system should send TCP keepalive messages to the
337 If they are sent, death of the connection or crash of one
338 of the machines will be properly noticed.
339 However, this means that
340 connections will die if the route is down temporarily, and some people
345 (to send keepalives), and the client will notice
346 if the network goes down or the remote host dies.
347 This is important in scripts, and many users want it too.
349 To disable keepalives, the value should be set to
351 .It Cm KerberosAuthentication
352 Specifies whether Kerberos authentication will be used.
353 The argument to this keyword must be
357 .It Cm KerberosTgtPassing
358 Specifies whether a Kerberos TGT will be forwarded to the server.
359 This will only work if the Kerberos server is actually an AFS kaserver.
360 The argument to this keyword must be
365 Specifies that a TCP/IP port on the local machine be forwarded over
366 the secure channel to the specified host and port from the remote machine.
367 The first argument must be a port number, and the second must be
369 IPv6 addresses can be specified with an alternative syntax:
371 Multiple forwardings may be specified, and additional
372 forwardings can be given on the command line.
373 Only the superuser can forward privileged ports.
375 Gives the verbosity level that is used when logging messages from
377 The possible values are:
378 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.
379 The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2
380 and DEBUG3 each specify higher levels of verbose output.
382 Specifies the MAC (message authentication code) algorithms
383 in order of preference.
384 The MAC algorithm is used in protocol version 2
385 for data integrity protection.
386 Multiple algorithms must be comma-separated.
388 .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
389 .It Cm NoHostAuthenticationForLocalhost
390 This option can be used if the home directory is shared across machines.
391 In this case localhost will refer to a different machine on each of
392 the machines and the user will get many warnings about changed host keys.
393 However, this option disables host authentication for localhost.
394 The argument to this keyword must be
398 The default is to check the host key for localhost.
399 .It Cm NumberOfPasswordPrompts
400 Specifies the number of password prompts before giving up.
401 The argument to this keyword must be an integer.
403 .It Cm PasswordAuthentication
404 Specifies whether to use password authentication.
405 The argument to this keyword must be
412 Specifies the port number to connect on the remote host.
414 .It Cm PreferredAuthentications
415 Specifies the order in which the client should try protocol 2
416 authentication methods. This allows a client to prefer one method (e.g.
417 .Cm keyboard-interactive )
418 over another method (e.g.
420 The default for this option is:
421 .Dq hostbased,publickey,keyboard-interactive,password .
423 Specifies the protocol versions
425 should support in order of preference.
426 The possible values are
430 Multiple versions must be comma-separated.
435 tries version 2 and falls back to version 1
436 if version 2 is not available.
438 Specifies the command to use to connect to the server.
440 string extends to the end of the line, and is executed with
442 In the command string,
444 will be substituted by the host name to
448 The command can be basically anything,
449 and should read from its standard input and write to its standard output.
450 It should eventually connect an
452 server running on some machine, or execute
455 Host key management will be done using the
456 HostName of the host being connected (defaulting to the name typed by
460 is not available for connects with a proxy command.
462 .It Cm PubkeyAuthentication
463 Specifies whether to try public key authentication.
464 The argument to this keyword must be
470 This option applies to protocol version 2 only.
472 Specifies that a TCP/IP port on the remote machine be forwarded over
473 the secure channel to the specified host and port from the local machine.
474 The first argument must be a port number, and the second must be
476 IPv6 addresses can be specified with an alternative syntax:
478 Multiple forwardings may be specified, and additional
479 forwardings can be given on the command line.
480 Only the superuser can forward privileged ports.
481 .It Cm RhostsAuthentication
482 Specifies whether to try rhosts based authentication.
484 declaration only affects the client side and has no effect whatsoever
486 Most servers do not permit RhostsAuthentication because it
488 .Cm RhostsRSAAuthentication ) .
489 The argument to this keyword must be
495 This option applies to protocol version 1 only.
496 .It Cm RhostsRSAAuthentication
497 Specifies whether to try rhosts based authentication with RSA host
505 This option applies to protocol version 1 only and requires
508 .It Cm RSAAuthentication
509 Specifies whether to try RSA authentication.
510 The argument to this keyword must be
514 RSA authentication will only be
515 attempted if the identity file exists, or an authentication agent is
519 Note that this option applies to protocol version 1 only.
520 .It Cm SmartcardDevice
521 Specifies which smartcard device to use. The argument to this keyword is
524 should use to communicate with a smartcard used for storing the user's
525 private RSA key. By default, no device is specified and smartcard support
527 .It Cm StrictHostKeyChecking
528 If this flag is set to
531 will never automatically add host keys to the
532 .Pa $HOME/.ssh/known_hosts
533 file, and refuses to connect to hosts whose host key has changed.
534 This provides maximum protection against trojan horse attacks,
535 however, can be annoying when the
536 .Pa /etc/ssh/ssh_known_hosts
537 file is poorly maintained, or connections to new hosts are
539 This option forces the user to manually
541 If this flag is set to
544 will automatically add new host keys to the
545 user known hosts files.
546 If this flag is set to
549 will be added to the user known host files only after the user
550 has confirmed that is what they really want to do, and
552 will refuse to connect to hosts whose host key has changed.
554 known hosts will be verified automatically in all cases.
562 .It Cm UsePrivilegedPort
563 Specifies whether to use a privileged port for outgoing connections.
570 Note that this option must be set to
573 .Cm RhostsAuthentication
575 .Cm RhostsRSAAuthentication
576 authentications are needed with older servers.
578 Specifies the user to log in as.
579 This can be useful when a different user name is used on different machines.
580 This saves the trouble of
581 having to remember to give the user name on the command line.
582 .It Cm UserKnownHostsFile
583 Specifies a file to use for the user
584 host key database instead of
585 .Pa $HOME/.ssh/known_hosts .
587 Specifies the location of the
591 .Pa /usr/X11R6/bin/xauth .
595 .It Pa $HOME/.ssh/config
596 This is the per-user configuration file.
597 The format of this file is described above.
598 This file is used by the
601 This file does not usually contain any sensitive information,
602 but the recommended permissions are read/write for the user, and not
603 accessible by others.
604 .It Pa /etc/ssh/ssh_config
605 Systemwide configuration file.
606 This file provides defaults for those
607 values that are not specified in the user's configuration file, and
608 for those users who do not have a configuration file.
609 This file must be world-readable.
612 OpenSSH is a derivative of the original and free
613 ssh 1.2.12 release by Tatu Ylonen.
614 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
615 Theo de Raadt and Dug Song
616 removed many bugs, re-added newer features and
618 Markus Friedl contributed the support for SSH
619 protocol versions 1.5 and 2.0.