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
54 feature-specific user configuration file(s) (see below),
55 user's configuration file
56 .Pq Pa $HOME/.ssh/config ,
57 and system-wide configuration file
58 .Pq Pa /etc/ssh/ssh_config .
59 For compatibility with other
61 versions, the following feature-specific user configuration files
62 will be processed after the command line options but before the user's
63 main configuration file, so options that other
65 versions may not support don't need to go in the main configuration file:
67 .It Pa $HOME/.ssh/config.gssapi
68 Read if GSSAPI authentication is supported. This is a good place for
69 the GssapiAuthentication and GssapiDelegateCredentials options.
70 .It Pa $HOME/.ssh/config.krb
71 Read if Kerberos authentication is supported. This is a good place
72 for the KerberosAuthentication and KerberosTgtPassing options.
73 .It Pa $HOME/.ssh/config.afs
74 Read if AFS token passing is supported. This is a good place for the
75 AfsTokenPassing option.
78 For each parameter, the first obtained value
80 The configuration files contain sections bracketed by
82 specifications, and that section is only applied for hosts that
83 match one of the patterns given in the specification.
84 The matched host name is the one given on the command line.
86 Since the first obtained value for each parameter is used, more
87 host-specific declarations should be given near the beginning of the
88 file, and general defaults at the end.
90 The configuration file has the following format:
92 Empty lines and lines starting with
96 Otherwise a line is of the format
97 .Dq keyword arguments .
98 Configuration options may be separated by whitespace or
99 optional whitespace and exactly one
101 the latter format is useful to avoid the need to quote whitespace
102 when specifying configuration options using the
111 keywords and their meanings are as follows (note that
112 keywords are case-insensitive and arguments are case-sensitive):
115 Restricts the following declarations (up to the next
117 keyword) to be only for those hosts that match one of the patterns
118 given after the keyword.
122 can be used as wildcards in the
126 as a pattern can be used to provide global
127 defaults for all hosts.
130 argument given on the command line (i.e., the name is not converted to
131 a canonicalized host name before matching).
132 .It Cm AFSTokenPassing
133 Specifies whether to pass AFS tokens to remote host.
134 The argument to this keyword must be
138 This option applies to protocol version 1 only.
142 passphrase/password querying will be disabled.
143 This option is useful in scripts and other batch jobs where no user
144 is present to supply the password.
152 Specify the interface to transmit from on machines with multiple
153 interfaces or aliased addresses.
154 Note that this option does not work if
155 .Cm UsePrivilegedPort
158 .It Cm ChallengeResponseAuthentication
159 Specifies whether to use challenge response authentication.
160 The argument to this keyword must be
167 If this flag is set to
169 ssh will additionally check the host IP address in the
172 This allows ssh to detect if a host key changed due to DNS spoofing.
173 If the option is set to
175 the check will not be executed.
179 Specifies the cipher to use for encrypting the session
180 in protocol version 1.
188 is only supported in the
190 client for interoperability with legacy protocol 1 implementations
191 that do not support the
193 cipher. Its use is strongly discouraged due to cryptographic
198 Specifies the ciphers allowed for protocol version 2
199 in order of preference.
200 Multiple ciphers must be comma-separated.
204 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
205 aes192-cbc,aes256-cbc''
207 .It Cm ClearAllForwardings
208 Specifies that all local, remote and dynamic port forwardings
209 specified in the configuration files or on the command line be
210 cleared. This option is primarily useful when used from the
212 command line to clear port forwardings set in
213 configuration files, and is automatically set by
224 Specifies whether to use compression.
231 .It Cm CompressionLevel
232 Specifies the compression level to use if compression is enabled.
233 The argument must be an integer from 1 (fast) to 9 (slow, best).
234 The default level is 6, which is good for most applications.
235 The meaning of the values is the same as in
237 Note that this option applies to protocol version 1 only.
238 .It Cm ConnectionAttempts
239 Specifies the number of tries (one per second) to make before exiting.
240 The argument must be an integer.
241 This may be useful in scripts if the connection sometimes fails.
243 .It Cm DynamicForward
244 Specifies that a TCP/IP port on the local machine be forwarded
245 over the secure channel, and the application
246 protocol is then used to determine where to connect to from the
247 remote machine. The argument must be a port number.
248 Currently the SOCKS4 protocol is supported, and
250 will act as a SOCKS4 server.
251 Multiple forwardings may be specified, and
252 additional forwardings can be given on the command line. Only
253 the superuser can forward privileged ports.
255 Sets the escape character (default:
257 The escape character can also
258 be set on the command line.
259 The argument should be a single character,
261 followed by a letter, or
263 to disable the escape
264 character entirely (making the connection transparent for binary
267 Specifies whether the connection to the authentication agent (if any)
268 will be forwarded to the remote machine.
276 Specifies whether X11 connections will be automatically redirected
277 over the secure channel and
287 Specifies whether remote hosts are allowed to connect to local
291 binds local port forwardings to the loopback address. This
292 prevents other remote hosts from connecting to forwarded ports.
294 can be used to specify that
296 should bind local port forwardings to the wildcard address,
297 thus allowing remote hosts to connect to forwarded ports.
304 .It Cm GlobalKnownHostsFile
305 Specifies a file to use for the global
306 host key database instead of
307 .Pa /etc/ssh/ssh_known_hosts .
308 .It Cm GssapiAuthentication
309 Specifies whether authentication based on GSSAPI may be used, either using
310 the result of a successful key exchange, or using GSSAPI user
314 .It Cm GssapiKeyExchange
315 Specifies whether key exchange based on GSSAPI may be used. When using
316 GSSAPI key exchange the server need not have a host key.
319 .It Cm GssapiDelegateCredentials
320 Specifies whether GSSAPI credentials will be delegated (forwarded) to
324 .It Cm HostbasedAuthentication
325 Specifies whether to try rhosts based authentication with public key
333 This option applies to protocol version 2 only and
335 .Cm RhostsRSAAuthentication .
336 .It Cm HostKeyAlgorithms
337 Specifies the protocol version 2 host key algorithms
338 that the client wants to use in order of preference.
339 The default for this option is:
340 .Dq ssh-rsa,ssh-dss .
342 Specifies an alias that should be used instead of the
343 real host name when looking up or saving the host key
344 in the host key database files.
345 This option is useful for tunneling ssh connections
346 or for multiple servers running on a single host.
348 Specifies the real host name to log into.
349 This can be used to specify nicknames or abbreviations for hosts.
350 Default is the name given on the command line.
351 Numeric IP addresses are also permitted (both on the command line and in
355 Specifies a file from which the user's RSA or DSA authentication identity
356 is read. The default is
357 .Pa $HOME/.ssh/identity
358 for protocol version 1, and
359 .Pa $HOME/.ssh/id_rsa
361 .Pa $HOME/.ssh/id_dsa
362 for protocol version 2.
363 Additionally, any identities represented by the authentication agent
364 will be used for authentication.
365 The file name may use the tilde
366 syntax to refer to a user's home directory.
367 It is possible to have
368 multiple identity files specified in configuration files; all these
369 identities will be tried in sequence.
371 Specifies whether the system should send TCP keepalive messages to the
373 If they are sent, death of the connection or crash of one
374 of the machines will be properly noticed.
375 However, this means that
376 connections will die if the route is down temporarily, and some people
381 (to send keepalives), and the client will notice
382 if the network goes down or the remote host dies.
383 This is important in scripts, and many users want it too.
385 To disable keepalives, the value should be set to
387 .It Cm KerberosAuthentication
388 Specifies whether Kerberos authentication will be used.
389 The argument to this keyword must be
393 .It Cm KerberosTgtPassing
394 Specifies whether a Kerberos TGT will be forwarded to the server.
395 This will only work if the Kerberos server is actually an AFS kaserver.
396 The argument to this keyword must be
401 Specifies that a TCP/IP port on the local machine be forwarded over
402 the secure channel to the specified host and port from the remote machine.
403 The first argument must be a port number, and the second must be
405 IPv6 addresses can be specified with an alternative syntax:
407 Multiple forwardings may be specified, and additional
408 forwardings can be given on the command line.
409 Only the superuser can forward privileged ports.
411 Gives the verbosity level that is used when logging messages from
413 The possible values are:
414 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.
415 The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2
416 and DEBUG3 each specify higher levels of verbose output.
418 Specifies the MAC (message authentication code) algorithms
419 in order of preference.
420 The MAC algorithm is used in protocol version 2
421 for data integrity protection.
422 Multiple algorithms must be comma-separated.
424 .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
425 .It Cm NoHostAuthenticationForLocalhost
426 This option can be used if the home directory is shared across machines.
427 In this case localhost will refer to a different machine on each of
428 the machines and the user will get many warnings about changed host keys.
429 However, this option disables host authentication for localhost.
430 The argument to this keyword must be
434 The default is to check the host key for localhost.
435 .It Cm NumberOfPasswordPrompts
436 Specifies the number of password prompts before giving up.
437 The argument to this keyword must be an integer.
439 .It Cm PasswordAuthentication
440 Specifies whether to use password authentication.
441 The argument to this keyword must be
448 Specifies the port number to connect on the remote host.
450 .It Cm PreferredAuthentications
451 Specifies the order in which the client should try protocol 2
452 authentication methods. This allows a client to prefer one method (e.g.
453 .Cm keyboard-interactive )
454 over another method (e.g.
456 The default for this option is:
457 .Dq hostbased,external-keyx,gssapi,publickey,keyboard-interactive,password .
459 Specifies the protocol versions
461 should support in order of preference.
462 The possible values are
466 Multiple versions must be comma-separated.
471 tries version 2 and falls back to version 1
472 if version 2 is not available.
474 Specifies the command to use to connect to the server.
476 string extends to the end of the line, and is executed with
478 In the command string,
480 will be substituted by the host name to
484 The command can be basically anything,
485 and should read from its standard input and write to its standard output.
486 It should eventually connect an
488 server running on some machine, or execute
491 Host key management will be done using the
492 HostName of the host being connected (defaulting to the name typed by
496 is not available for connects with a proxy command.
498 .It Cm PubkeyAuthentication
499 Specifies whether to try public key authentication.
500 The argument to this keyword must be
506 This option applies to protocol version 2 only.
508 Specifies that a TCP/IP port on the remote machine be forwarded over
509 the secure channel to the specified host and port from the local machine.
510 The first argument must be a port number, and the second must be
512 IPv6 addresses can be specified with an alternative syntax:
514 Multiple forwardings may be specified, and additional
515 forwardings can be given on the command line.
516 Only the superuser can forward privileged ports.
517 .It Cm RhostsAuthentication
518 Specifies whether to try rhosts based authentication.
520 declaration only affects the client side and has no effect whatsoever
522 Most servers do not permit RhostsAuthentication because it
524 .Cm RhostsRSAAuthentication ) .
525 The argument to this keyword must be
531 This option applies to protocol version 1 only.
532 .It Cm RhostsRSAAuthentication
533 Specifies whether to try rhosts based authentication with RSA host
541 This option applies to protocol version 1 only and requires
544 .It Cm RSAAuthentication
545 Specifies whether to try RSA authentication.
546 The argument to this keyword must be
550 RSA authentication will only be
551 attempted if the identity file exists, or an authentication agent is
555 Note that this option applies to protocol version 1 only.
556 .It Cm SmartcardDevice
557 Specifies which smartcard device to use. The argument to this keyword is
560 should use to communicate with a smartcard used for storing the user's
561 private RSA key. By default, no device is specified and smartcard support
563 .It Cm StrictHostKeyChecking
564 If this flag is set to
567 will never automatically add host keys to the
568 .Pa $HOME/.ssh/known_hosts
569 file, and refuses to connect to hosts whose host key has changed.
570 This provides maximum protection against trojan horse attacks,
571 however, can be annoying when the
572 .Pa /etc/ssh/ssh_known_hosts
573 file is poorly maintained, or connections to new hosts are
575 This option forces the user to manually
577 If this flag is set to
580 will automatically add new host keys to the
581 user known hosts files.
582 If this flag is set to
585 will be added to the user known host files only after the user
586 has confirmed that is what they really want to do, and
588 will refuse to connect to hosts whose host key has changed.
590 known hosts will be verified automatically in all cases.
598 .It Cm UsePrivilegedPort
599 Specifies whether to use a privileged port for outgoing connections.
606 Note that this option must be set to
609 .Cm RhostsAuthentication
611 .Cm RhostsRSAAuthentication
612 authentications are needed with older servers.
614 Specifies the user to log in as.
615 This can be useful when a different user name is used on different machines.
616 This saves the trouble of
617 having to remember to give the user name on the command line.
618 .It Cm UserKnownHostsFile
619 Specifies a file to use for the user
620 host key database instead of
621 .Pa $HOME/.ssh/known_hosts .
623 Specifies the location of the
627 .Pa /usr/X11R6/bin/xauth .
631 .It Pa $HOME/.ssh/config
632 This is the per-user configuration file.
633 The format of this file is described above.
634 This file is used by the
637 This file does not usually contain any sensitive information,
638 but the recommended permissions are read/write for the user, and not
639 accessible by others.
640 .It Pa /etc/ssh/ssh_config
641 Systemwide configuration file.
642 This file provides defaults for those
643 values that are not specified in the user's configuration file, and
644 for those users who do not have a configuration file.
645 This file must be world-readable.
648 OpenSSH is a derivative of the original and free
649 ssh 1.2.12 release by Tatu Ylonen.
650 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
651 Theo de Raadt and Dug Song
652 removed many bugs, re-added newer features and
654 Markus Friedl contributed the support for SSH
655 protocol versions 1.5 and 2.0.