2 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
3 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 .\" All rights reserved
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".
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.
16 .\" Redistribution and use in source and binary forms, with or without
17 .\" modification, are permitted provided that the following conditions
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.
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.
36 .\" $OpenBSD: ssh_config.5,v 1.153 2011/08/02 01:22:11 djm Exp $
37 .Dd $Mdocdate: August 2 2011 $
42 .Nd OpenSSH SSH client configuration files
45 .Nm /etc/ssh/ssh_config
48 obtains configuration data from the following sources in
51 .Bl -enum -offset indent -compact
55 user's configuration file
58 system-wide configuration file
59 .Pq Pa /etc/ssh/ssh_config
62 For each parameter, the first obtained value
64 The configuration files contain sections separated by
66 specifications, and that section is only applied for hosts that
67 match one of the patterns given in the specification.
68 The matched host name is the one given on the command line.
70 Since the first obtained value for each parameter is used, more
71 host-specific declarations should be given near the beginning of the
72 file, and general defaults at the end.
76 package sets several options as standard in
77 .Pa /etc/ssh/ssh_config
78 which are not the default in
81 .Bl -bullet -offset indent -compact
83 .Cm SendEnv No LANG LC_*
85 .Cm HashKnownHosts No yes
87 .Cm GSSAPIAuthentication No yes
90 The configuration file has the following format:
92 Empty lines and lines starting with
95 Otherwise a line is of the format
96 .Dq keyword arguments .
97 Configuration options may be separated by whitespace or
98 optional whitespace and exactly one
100 the latter format is useful to avoid the need to quote whitespace
101 when specifying configuration options using the
108 Arguments may optionally be enclosed in double quotes
110 in order to represent arguments containing spaces.
113 keywords and their meanings are as follows (note that
114 keywords are case-insensitive and arguments are case-sensitive):
117 Restricts the following declarations (up to the next
119 keyword) to be only for those hosts that match one of the patterns
120 given after the keyword.
121 If more than one pattern is provided, they should be separated by whitespace.
124 as a pattern can be used to provide global
125 defaults for all hosts.
128 argument given on the command line (i.e. the name is not converted to
129 a canonicalized host name before matching).
131 A pattern entry may be negated by prefixing it with an exclamation mark
133 If a negated entry is matched, then the
135 entry is ignored, regardless of whether any other patterns on the line
137 Negated matches are therefore useful to provide exceptions for wildcard
142 for more information on patterns.
144 Specifies which address family to use when connecting.
154 passphrase/password querying will be disabled.
156 .Cm ServerAliveInterval
157 option will be set to 300 seconds by default.
158 This option is useful in scripts and other batch jobs where no user
159 is present to supply the password,
160 and where it is desirable to detect a broken network swiftly.
168 Use the specified address on the local machine as the source address of
170 Only useful on systems with more than one address.
171 Note that this option does not work if
172 .Cm UsePrivilegedPort
175 .It Cm ChallengeResponseAuthentication
176 Specifies whether to use challenge-response authentication.
177 The argument to this keyword must be
184 If this flag is set to
187 will additionally check the host IP address in the
190 This allows ssh to detect if a host key changed due to DNS spoofing.
191 If the option is set to
193 the check will not be executed.
197 Specifies the cipher to use for encrypting the session
198 in protocol version 1.
206 is only supported in the
208 client for interoperability with legacy protocol 1 implementations
209 that do not support the
212 Its use is strongly discouraged due to cryptographic weaknesses.
216 Specifies the ciphers allowed for protocol version 2
217 in order of preference.
218 Multiple ciphers must be comma-separated.
219 The supported ciphers are
234 .Bd -literal -offset 3n
235 aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
236 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
239 .It Cm ClearAllForwardings
240 Specifies that all local, remote, and dynamic port forwardings
241 specified in the configuration files or on the command line be
243 This option is primarily useful when used from the
245 command line to clear port forwardings set in
246 configuration files, and is automatically set by
257 Specifies whether to use compression.
264 .It Cm CompressionLevel
265 Specifies the compression level to use if compression is enabled.
266 The argument must be an integer from 1 (fast) to 9 (slow, best).
267 The default level is 6, which is good for most applications.
268 The meaning of the values is the same as in
270 Note that this option applies to protocol version 1 only.
271 .It Cm ConnectionAttempts
272 Specifies the number of tries (one per second) to make before exiting.
273 The argument must be an integer.
274 This may be useful in scripts if the connection sometimes fails.
276 .It Cm ConnectTimeout
277 Specifies the timeout (in seconds) used when connecting to the
278 SSH server, instead of using the default system TCP timeout.
279 This value is used only when the target is down or really unreachable,
280 not when it refuses the connection.
282 Enables the sharing of multiple sessions over a single network connection.
286 will listen for connections on a control socket specified using the
289 Additional sessions can connect to this socket using the same
296 These sessions will try to reuse the master instance's network connection
297 rather than initiating new ones, but will fall back to connecting normally
298 if the control socket does not exist, or is not listening.
303 to listen for control connections, but require confirmation using the
305 program before they are accepted (see
311 ssh will continue without connecting to a master instance.
315 forwarding is supported over these multiplexed connections, however the
316 display and agent forwarded will be the one belonging to the master
317 connection i.e. it is not possible to forward multiple displays or agents.
319 Two additional options allow for opportunistic multiplexing: try to use a
320 master connection but fall back to creating a new one if one does not already
326 The latter requires confirmation like the
330 Specify the path to the control socket used for connection sharing as described
333 section above or the string
335 to disable connection sharing.
338 will be substituted by the first component of the local host name,
340 will be substituted by the local host name (including any domain name),
342 will be substituted by the target host name,
344 will be substituted by the original target host name
345 specified on the command line,
349 by the remote login username, and
351 by the username of the user running
353 It is recommended that any
355 used for opportunistic connection sharing include
356 at least %h, %p, and %r.
357 This ensures that shared connections are uniquely identified.
358 .It Cm ControlPersist
359 When used in conjunction with
361 specifies that the master connection should remain open
362 in the background (waiting for future client connections)
363 after the initial client connection has been closed.
366 then the master connection will not be placed into the background,
367 and will close as soon as the initial client connection is closed.
370 then the master connection will remain in the background indefinitely
371 (until killed or closed via a mechanism such as the
375 If set to a time in seconds, or a time in any of the formats documented in
377 then the backgrounded master connection will automatically terminate
378 after it has remained idle (with no client connections) for the
380 .It Cm DynamicForward
381 Specifies that a TCP port on the local machine be forwarded
382 over the secure channel, and the application
383 protocol is then used to determine where to connect to from the
388 .Oo Ar bind_address : Oc Ar port .
390 IPv6 addresses can be specified by enclosing addresses in square brackets.
391 By default, the local port is bound in accordance with the
396 may be used to bind the connection to a specific address.
401 indicates that the listening port be bound for local use only, while an
404 indicates that the port should be available from all interfaces.
406 Currently the SOCKS4 and SOCKS5 protocols are supported, and
408 will act as a SOCKS server.
409 Multiple forwardings may be specified, and
410 additional forwardings can be given on the command line.
411 Only the superuser can forward privileged ports.
412 .It Cm EnableSSHKeysign
413 Setting this option to
415 in the global client configuration file
416 .Pa /etc/ssh/ssh_config
417 enables the use of the helper program
420 .Cm HostbasedAuthentication .
427 This option should be placed in the non-hostspecific section.
430 for more information.
432 Sets the escape character (default:
434 The escape character can also
435 be set on the command line.
436 The argument should be a single character,
438 followed by a letter, or
440 to disable the escape
441 character entirely (making the connection transparent for binary
443 .It Cm ExitOnForwardFailure
446 should terminate the connection if it cannot set up all requested
447 dynamic, tunnel, local, and remote port forwardings.
455 Specifies whether the connection to the authentication agent (if any)
456 will be forwarded to the remote machine.
464 Agent forwarding should be enabled with caution.
465 Users with the ability to bypass file permissions on the remote host
466 (for the agent's Unix-domain socket)
467 can access the local agent through the forwarded connection.
468 An attacker cannot obtain key material from the agent,
469 however they can perform operations on the keys that enable them to
470 authenticate using the identities loaded into the agent.
472 Specifies whether X11 connections will be automatically redirected
473 over the secure channel and
483 X11 forwarding should be enabled with caution.
484 Users with the ability to bypass file permissions on the remote host
485 (for the user's X11 authorization database)
486 can access the local X11 display through the forwarded connection.
487 An attacker may then be able to perform activities such as keystroke monitoring
489 .Cm ForwardX11Trusted
490 option is also enabled.
491 .It Cm ForwardX11Timeout
492 Specify a timeout for untrusted X11 forwarding
493 using the format described in the
497 X11 connections received by
499 after this time will be refused.
500 The default is to disable untrusted X11 forwarding after twenty minutes has
502 .It Cm ForwardX11Trusted
503 If this option is set to
505 remote X11 clients will have full access to the original X11 display.
507 If this option is set to
509 remote X11 clients will be considered untrusted and prevented
510 from stealing or tampering with data belonging to trusted X11
514 token used for the session will be set to expire after 20 minutes.
515 Remote clients will be refused access after this time.
521 See the X11 SECURITY extension specification for full details on
522 the restrictions imposed on untrusted clients.
524 Specifies whether remote hosts are allowed to connect to local
528 binds local port forwardings to the loopback address.
529 This prevents other remote hosts from connecting to forwarded ports.
531 can be used to specify that ssh
532 should bind local port forwardings to the wildcard address,
533 thus allowing remote hosts to connect to forwarded ports.
540 .It Cm GlobalKnownHostsFile
541 Specifies one or more files to use for the global
542 host key database, separated by whitespace.
544 .Pa /etc/ssh/ssh_known_hosts ,
545 .Pa /etc/ssh/ssh_known_hosts2 .
546 .It Cm GSSAPIAuthentication
547 Specifies whether user authentication based on GSSAPI is allowed.
550 Note that this option applies to protocol version 2 only.
551 .It Cm GSSAPIKeyExchange
552 Specifies whether key exchange based on GSSAPI may be used. When using
553 GSSAPI key exchange the server need not have a host key.
556 Note that this option applies to protocol version 2 only.
557 .It Cm GSSAPIClientIdentity
558 If set, specifies the GSSAPI client identity that ssh should use when
559 connecting to the server. The default is unset, which means that the default
560 identity will be used.
561 .It Cm GSSAPIServerIdentity
562 If set, specifies the GSSAPI server identity that ssh should expect when
563 connecting to the server. The default is unset, which means that the
564 expected GSSAPI server identity will be determined from the target
566 .It Cm GSSAPIDelegateCredentials
567 Forward (delegate) credentials to the server.
570 Note that this option applies to protocol version 2 connections using GSSAPI.
571 .It Cm GSSAPIRenewalForcesRekey
574 then renewal of the client's GSSAPI credentials will force the rekeying of the
575 ssh connection. With a compatible server, this can delegate the renewed
576 credentials to a session on the server.
579 .It Cm GSSAPITrustDns
581 .Dq yes to indicate that the DNS is trusted to securely canonicalize
582 the name of the host being connected to. If
583 .Dq no, the hostname entered on the
584 command line will be passed untouched to the GSSAPI library.
587 This option only applies to protocol version 2 connections using GSSAPI.
588 .It Cm HashKnownHosts
591 should hash host names and addresses when they are added to
592 .Pa ~/.ssh/known_hosts .
593 These hashed names may be used normally by
597 but they do not reveal identifying information should the file's contents
601 Note that existing names and addresses in known hosts files
602 will not be converted automatically,
603 but may be manually hashed using
605 Use of this option may break facilities such as tab-completion that rely
606 on being able to read unhashed host names from
607 .Pa ~/.ssh/known_hosts .
608 .It Cm HostbasedAuthentication
609 Specifies whether to try rhosts based authentication with public key
617 This option applies to protocol version 2 only and
619 .Cm RhostsRSAAuthentication .
620 .It Cm HostKeyAlgorithms
621 Specifies the protocol version 2 host key algorithms
622 that the client wants to use in order of preference.
623 The default for this option is:
624 .Bd -literal -offset 3n
625 ecdsa-sha2-nistp256-cert-v01@openssh.com,
626 ecdsa-sha2-nistp384-cert-v01@openssh.com,
627 ecdsa-sha2-nistp521-cert-v01@openssh.com,
628 ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,
629 ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,
630 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
634 If hostkeys are known for the destination host then this default is modified
635 to prefer their algorithms.
637 Specifies an alias that should be used instead of the
638 real host name when looking up or saving the host key
639 in the host key database files.
640 This option is useful for tunneling SSH connections
641 or for multiple servers running on a single host.
643 Specifies the real host name to log into.
644 This can be used to specify nicknames or abbreviations for hosts.
645 If the hostname contains the character sequence
647 then this will be replaced with the host name specified on the command line
648 (this is useful for manipulating unqualified names).
649 The default is the name given on the command line.
650 Numeric IP addresses are also permitted (both on the command line and in
653 .It Cm IdentitiesOnly
656 should only use the authentication identity files configured in the
661 offers more identities.
662 The argument to this keyword must be
666 This option is intended for situations where ssh-agent
667 offers many different identities.
671 Specifies a file from which the user's DSA, ECDSA or DSA authentication
675 for protocol version 1, and
680 for protocol version 2.
681 Additionally, any identities represented by the authentication agent
682 will be used for authentication.
684 will try to load certificate information from the filename obtained by
687 to the path of a specified
690 The file name may use the tilde
691 syntax to refer to a user's home directory or one of the following
694 (local user's home directory),
700 (remote host name) or
704 It is possible to have
705 multiple identity files specified in configuration files; all these
706 identities will be tried in sequence.
709 directives will add to the list of identities tried (this behaviour
710 differs from that of other configuration directives).
712 Specifies the IPv4 type-of-service or DSCP class for connections.
739 This option may take one or two arguments, separated by whitespace.
740 If one argument is specified, it is used as the packet class unconditionally.
741 If two values are specified, the first is automatically selected for
742 interactive sessions and the second for non-interactive sessions.
745 for interactive sessions and
747 for non-interactive sessions.
748 .It Cm KbdInteractiveAuthentication
749 Specifies whether to use keyboard-interactive authentication.
750 The argument to this keyword must be
756 .It Cm KbdInteractiveDevices
757 Specifies the list of methods to use in keyboard-interactive authentication.
758 Multiple method names must be comma-separated.
759 The default is to use the server specified list.
760 The methods available vary depending on what the server supports.
761 For an OpenSSH server,
762 it may be zero or more of:
768 Specifies the available KEX (Key Exchange) algorithms.
769 Multiple algorithms must be comma-separated.
771 .Bd -literal -offset indent
772 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
773 diffie-hellman-group-exchange-sha256,
774 diffie-hellman-group-exchange-sha1,
775 diffie-hellman-group14-sha1,
776 diffie-hellman-group1-sha1
779 Specifies a command to execute on the local machine after successfully
780 connecting to the server.
781 The command string extends to the end of the line, and is executed with
783 The following escape character substitutions will be performed:
785 (local user's home directory),
791 (host name as provided on the command line),
795 (remote user name) or
799 The command is run synchronously and does not have access to the
803 It should not be used for interactive commands.
805 This directive is ignored unless
806 .Cm PermitLocalCommand
809 Specifies that a TCP port on the local machine be forwarded over
810 the secure channel to the specified host and port from the remote machine.
811 The first argument must be
813 .Oo Ar bind_address : Oc Ar port
815 and the second argument must be
816 .Ar host : Ns Ar hostport .
817 IPv6 addresses can be specified by enclosing addresses in square brackets.
818 Multiple forwardings may be specified, and additional forwardings can be
819 given on the command line.
820 Only the superuser can forward privileged ports.
821 By default, the local port is bound in accordance with the
826 may be used to bind the connection to a specific address.
831 indicates that the listening port be bound for local use only, while an
834 indicates that the port should be available from all interfaces.
836 Gives the verbosity level that is used when logging messages from
838 The possible values are:
839 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
841 DEBUG and DEBUG1 are equivalent.
842 DEBUG2 and DEBUG3 each specify higher levels of verbose output.
844 Specifies the MAC (message authentication code) algorithms
845 in order of preference.
846 The MAC algorithm is used in protocol version 2
847 for data integrity protection.
848 Multiple algorithms must be comma-separated.
850 .Bd -literal -offset indent
851 hmac-md5,hmac-sha1,umac-64@openssh.com,
852 hmac-ripemd160,hmac-sha1-96,hmac-md5-96,
853 hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,
856 .It Cm NoHostAuthenticationForLocalhost
857 This option can be used if the home directory is shared across machines.
858 In this case localhost will refer to a different machine on each of
859 the machines and the user will get many warnings about changed host keys.
860 However, this option disables host authentication for localhost.
861 The argument to this keyword must be
865 The default is to check the host key for localhost.
866 .It Cm NumberOfPasswordPrompts
867 Specifies the number of password prompts before giving up.
868 The argument to this keyword must be an integer.
870 .It Cm PasswordAuthentication
871 Specifies whether to use password authentication.
872 The argument to this keyword must be
878 .It Cm PermitLocalCommand
879 Allow local command execution via the
882 .Ic !\& Ns Ar command
891 .It Cm PKCS11Provider
892 Specifies which PKCS#11 provider to use.
893 The argument to this keyword is the PKCS#11 shared library
895 should use to communicate with a PKCS#11 token providing the user's
898 Specifies the port number to connect on the remote host.
900 .It Cm PreferredAuthentications
901 Specifies the order in which the client should try protocol 2
902 authentication methods.
903 This allows a client to prefer one method (e.g.\&
904 .Cm keyboard-interactive )
905 over another method (e.g.\&
908 .Bd -literal -offset indent
909 gssapi-with-mic,hostbased,publickey,
910 keyboard-interactive,password
913 Specifies the protocol versions
915 should support in order of preference.
916 The possible values are
920 Multiple versions must be comma-separated.
921 When this option is set to
924 will try version 2 and fall back to version 1
925 if version 2 is not available.
929 Specifies the command to use to connect to the server.
931 string extends to the end of the line, and is executed with
933 In the command string, any occurrence of
935 will be substituted by the host name to
940 by the remote user name.
941 The command can be basically anything,
942 and should read from its standard input and write to its standard output.
943 It should eventually connect an
945 server running on some machine, or execute
948 Host key management will be done using the
949 HostName of the host being connected (defaulting to the name typed by
951 Setting the command to
953 disables this option entirely.
956 is not available for connects with a proxy command.
958 This directive is useful in conjunction with
960 and its proxy support.
961 For example, the following directive would connect via an HTTP proxy at
963 .Bd -literal -offset 3n
964 ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
966 .It Cm PubkeyAuthentication
967 Specifies whether to try public key authentication.
968 The argument to this keyword must be
974 This option applies to protocol version 2 only.
976 Specifies the maximum amount of data that may be transmitted before the
977 session key is renegotiated.
978 The argument is the number of bytes, with an optional suffix of
983 to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
984 The default is between
988 depending on the cipher.
989 This option applies to protocol version 2 only.
991 Specifies that a TCP port on the remote machine be forwarded over
992 the secure channel to the specified host and port from the local machine.
993 The first argument must be
995 .Oo Ar bind_address : Oc Ar port
997 and the second argument must be
998 .Ar host : Ns Ar hostport .
999 IPv6 addresses can be specified by enclosing addresses in square brackets.
1000 Multiple forwardings may be specified, and additional
1001 forwardings can be given on the command line.
1002 Privileged ports can be forwarded only when
1003 logging in as root on the remote machine.
1009 the listen port will be dynamically allocated on the server and reported
1010 to the client at run time.
1014 is not specified, the default is to only bind to loopback addresses.
1019 or an empty string, then the forwarding is requested to listen on all
1023 will only succeed if the server's
1025 option is enabled (see
1026 .Xr sshd_config 5 ) .
1028 Specifies whether to request a pseudo-tty for the session.
1029 The argument may be one of:
1031 (never request a TTY),
1033 (always request a TTY when standard input is a TTY),
1035 (always request a TTY) or
1037 (request a TTY when opening a login session).
1038 This option mirrors the
1044 .It Cm RhostsRSAAuthentication
1045 Specifies whether to try rhosts based authentication with RSA host
1047 The argument must be
1053 This option applies to protocol version 1 only and requires
1056 .It Cm RSAAuthentication
1057 Specifies whether to try RSA authentication.
1058 The argument to this keyword must be
1062 RSA authentication will only be
1063 attempted if the identity file exists, or an authentication agent is
1067 Note that this option applies to protocol version 1 only.
1069 Specifies what variables from the local
1071 should be sent to the server.
1072 Note that environment passing is only supported for protocol 2.
1073 The server must also support it, and the server must be configured to
1074 accept these environment variables.
1079 for how to configure the server.
1080 Variables are specified by name, which may contain wildcard characters.
1081 Multiple environment variables may be separated by whitespace or spread
1085 The default is not to send any environment variables.
1089 for more information on patterns.
1090 .It Cm ServerAliveCountMax
1091 Sets the number of server alive messages (see below) which may be
1094 receiving any messages back from the server.
1095 If this threshold is reached while server alive messages are being sent,
1096 ssh will disconnect from the server, terminating the session.
1097 It is important to note that the use of server alive messages is very
1101 The server alive messages are sent through the encrypted channel
1102 and therefore will not be spoofable.
1103 The TCP keepalive option enabled by
1106 The server alive mechanism is valuable when the client or
1107 server depend on knowing when a connection has become inactive.
1109 The default value is 3.
1111 .Cm ServerAliveInterval
1112 (see below) is set to 15 and
1113 .Cm ServerAliveCountMax
1114 is left at the default, if the server becomes unresponsive,
1115 ssh will disconnect after approximately 45 seconds.
1116 This option applies to protocol version 2 only; in protocol version
1117 1 there is no mechanism to request a response from the server to the
1118 server alive messages, so disconnection is the responsibility of the TCP
1120 .It Cm ServerAliveInterval
1121 Sets a timeout interval in seconds after which if no data has been received
1124 will send a message through the encrypted
1125 channel to request a response from the server.
1127 is 0, indicating that these messages will not be sent to the server,
1131 This option applies to protocol version 2 only.
1132 .Cm ProtocolKeepAlives
1135 are Debian-specific compatibility aliases for this option.
1136 .It Cm StrictHostKeyChecking
1137 If this flag is set to
1140 will never automatically add host keys to the
1141 .Pa ~/.ssh/known_hosts
1142 file, and refuses to connect to hosts whose host key has changed.
1143 This provides maximum protection against trojan horse attacks,
1144 though it can be annoying when the
1145 .Pa /etc/ssh/ssh_known_hosts
1146 file is poorly maintained or when connections to new hosts are
1148 This option forces the user to manually
1150 If this flag is set to
1152 ssh will automatically add new host keys to the
1153 user known hosts files.
1154 If this flag is set to
1157 will be added to the user known host files only after the user
1158 has confirmed that is what they really want to do, and
1159 ssh will refuse to connect to hosts whose host key has changed.
1161 known hosts will be verified automatically in all cases.
1162 The argument must be
1170 Specifies whether the system should send TCP keepalive messages to the
1172 If they are sent, death of the connection or crash of one
1173 of the machines will be properly noticed.
1174 This option only uses TCP keepalives (as opposed to using ssh level
1175 keepalives), so takes a long time to notice when the connection dies.
1176 As such, you probably want
1178 .Cm ServerAliveInterval
1180 However, this means that
1181 connections will die if the route is down temporarily, and some people
1186 (to send TCP keepalive messages), and the client will notice
1187 if the network goes down or the remote host dies.
1188 This is important in scripts, and many users want it too.
1190 To disable TCP keepalive messages, the value should be set to
1195 device forwarding between the client and the server.
1196 The argument must be
1206 requests the default tunnel mode, which is
1207 .Dq point-to-point .
1213 devices to open on the client
1218 The argument must be
1220 .Ar local_tun Op : Ar remote_tun .
1222 The devices may be specified by numerical ID or the keyword
1224 which uses the next available tunnel device.
1227 is not specified, it defaults to
1231 .It Cm UseBlacklistedKeys
1234 should use keys recorded in its blacklist of known-compromised keys (see
1239 then attempts to use compromised keys for authentication will be logged but
1241 It is strongly recommended that this be used only to install new authorized
1242 keys on the remote system, and even then only with the utmost care.
1245 then attempts to use compromised keys for authentication will be prevented.
1248 .It Cm UsePrivilegedPort
1249 Specifies whether to use a privileged port for outgoing connections.
1250 The argument must be
1259 must be setuid root.
1260 Note that this option must be set to
1263 .Cm RhostsRSAAuthentication
1266 Specifies the user to log in as.
1267 This can be useful when a different user name is used on different machines.
1268 This saves the trouble of
1269 having to remember to give the user name on the command line.
1270 .It Cm UserKnownHostsFile
1271 Specifies one or more files to use for the user
1272 host key database, separated by whitespace.
1274 .Pa ~/.ssh/known_hosts ,
1275 .Pa ~/.ssh/known_hosts2 .
1276 .It Cm VerifyHostKeyDNS
1277 Specifies whether to verify the remote key using DNS and SSHFP resource
1279 If this option is set to
1281 the client will implicitly trust keys that match a secure fingerprint
1283 Insecure fingerprints will be handled as if this option was set to
1285 If this option is set to
1287 information on fingerprint match will be displayed, but the user will still
1288 need to confirm new host keys according to the
1289 .Cm StrictHostKeyChecking
1291 The argument must be
1298 Note that this option applies to protocol version 2 only.
1301 .Sx VERIFYING HOST KEYS
1304 .It Cm VisualHostKey
1305 If this flag is set to
1307 an ASCII art representation of the remote host key fingerprint is
1308 printed in addition to the hex fingerprint string at login and
1309 for unknown host keys.
1310 If this flag is set to
1312 no fingerprint strings are printed at login and
1313 only the hex fingerprint string will be printed for unknown host keys.
1316 .It Cm XAuthLocation
1317 Specifies the full pathname of the
1321 .Pa /usr/X11R6/bin/xauth .
1326 consists of zero or more non-whitespace characters,
1328 (a wildcard that matches zero or more characters),
1331 (a wildcard that matches exactly one character).
1332 For example, to specify a set of declarations for any host in the
1335 the following pattern could be used:
1339 The following pattern
1340 would match any host in the 192.168.0.[0-9] network range:
1342 .Dl Host 192.168.0.?
1346 is a comma-separated list of patterns.
1347 Patterns within pattern-lists may be negated
1348 by preceding them with an exclamation mark
1351 to allow a key to be used from anywhere within an organisation
1355 the following entry (in authorized_keys) could be used:
1357 .Dl from=\&"!*.dialup.example.com,*.example.com\&"
1360 .It Pa ~/.ssh/config
1361 This is the per-user configuration file.
1362 The format of this file is described above.
1363 This file is used by the SSH client.
1364 Because of the potential for abuse, this file must have strict permissions:
1365 read/write for the user, and not accessible by others.
1366 It may be group-writable provided that the group in question contains only
1368 .It Pa /etc/ssh/ssh_config
1369 Systemwide configuration file.
1370 This file provides defaults for those
1371 values that are not specified in the user's configuration file, and
1372 for those users who do not have a configuration file.
1373 This file must be world-readable.
1378 OpenSSH is a derivative of the original and free
1379 ssh 1.2.12 release by Tatu Ylonen.
1380 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1381 Theo de Raadt and Dug Song
1382 removed many bugs, re-added newer features and
1384 Markus Friedl contributed the support for SSH
1385 protocol versions 1.5 and 2.0.