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.191 2014/07/15 15:54:14 millert Exp $
37 .Dd $Mdocdate: July 15 2014 $
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.
74 The configuration file has the following format:
76 Empty lines and lines starting with
79 Otherwise a line is of the format
80 .Dq keyword arguments .
81 Configuration options may be separated by whitespace or
82 optional whitespace and exactly one
84 the latter format is useful to avoid the need to quote whitespace
85 when specifying configuration options using the
92 Arguments may optionally be enclosed in double quotes
94 in order to represent arguments containing spaces.
97 keywords and their meanings are as follows (note that
98 keywords are case-insensitive and arguments are case-sensitive):
101 Restricts the following declarations (up to the next
105 keyword) to be only for those hosts that match one of the patterns
106 given after the keyword.
107 If more than one pattern is provided, they should be separated by whitespace.
110 as a pattern can be used to provide global
111 defaults for all hosts.
114 argument given on the command line (i.e. the name is not converted to
115 a canonicalized host name before matching).
117 A pattern entry may be negated by prefixing it with an exclamation mark
119 If a negated entry is matched, then the
121 entry is ignored, regardless of whether any other patterns on the line
123 Negated matches are therefore useful to provide exceptions for wildcard
128 for more information on patterns.
130 Restricts the following declarations (up to the next
134 keyword) to be used only when the conditions following the
136 keyword are satisfied.
137 Match conditions are specified using one or more keyword/criteria pairs
140 which matches all criteria.
141 The available keywords are:
151 keyword executes the specified command under the user's shell.
152 If the command returns a zero exit status then the condition is considered true.
153 Commands containing whitespace characters must be quoted.
154 The following character sequences in the command will be expanded prior to
157 will be substituted by the first component of the local host name,
159 will be substituted by the local host name (including any domain name),
161 will be substituted by the target host name,
163 will be substituted by the original target host name
164 specified on the command-line,
166 the destination port,
168 by the remote login username, and
170 by the username of the user running
173 The other keywords' criteria must be single entries or comma-separated
174 lists and may use the wildcard and negation operators described in the
179 keyword are matched against the target hostname, after any substitution
185 keyword matches against the hostname as it was specified on the command-line.
188 keyword matches against the target username on the remote host.
191 keyword matches against the name of the local user running
193 (this keyword may be useful in system-wide
197 Specifies which address family to use when connecting.
207 passphrase/password querying will be disabled.
208 This option is useful in scripts and other batch jobs where no user
209 is present to supply the password.
217 Use the specified address on the local machine as the source address of
219 Only useful on systems with more than one address.
220 Note that this option does not work if
221 .Cm UsePrivilegedPort
224 .It Cm CanonicalDomains
226 .Cm CanonicalizeHostname
227 is enabled, this option specifies the list of domain suffixes in which to
228 search for the specified destination host.
229 .It Cm CanonicalizeFallbackLocal
230 Specifies whether to fail with an error when hostname canonicalization fails.
233 will attempt to look up the unqualified hostname using the system resolver's
240 .Cm CanonicalizeHostname
241 is enabled and the target hostname cannot be found in any of the domains
243 .Cm CanonicalDomains .
244 .It Cm CanonicalizeHostname
245 Controls whether explicit hostname canonicalization is performed.
248 is not to perform any name rewriting and let the system resolver handle all
252 then, for connections that do not use a
255 will attempt to canonicalize the hostname specified on the command line
259 .Cm CanonicalizePermittedCNAMEs
262 .Cm CanonicalizeHostname
265 then canonicalization is applied to proxied connections too.
267 If this option is enabled and canonicalisation results in the target hostname
268 changing, then the configuration files are processed again using the new
269 target name to pick up any new configuration in matching
272 .It Cm CanonicalizeMaxDots
273 Specifies the maximum number of dot characters in a hostname before
274 canonicalization is disabled.
277 allows a single dot (i.e. hostname.subdomain).
278 .It Cm CanonicalizePermittedCNAMEs
279 Specifies rules to determine whether CNAMEs should be followed when
280 canonicalizing hostnames.
281 The rules consist of one or more arguments of
282 .Ar source_domain_list : Ns Ar target_domain_list ,
284 .Ar source_domain_list
285 is a pattern-list of domains that may follow CNAMEs in canonicalization,
287 .Ar target_domain_list
288 is a pattern-list of domains that they may resolve to.
291 .Dq *.a.example.com:*.b.example.com,*.c.example.com
292 will allow hostnames matching
294 to be canonicalized to names in the
299 .It Cm ChallengeResponseAuthentication
300 Specifies whether to use challenge-response authentication.
301 The argument to this keyword must be
308 If this flag is set to
311 will additionally check the host IP address in the
314 This allows ssh to detect if a host key changed due to DNS spoofing.
315 If the option is set to
317 the check will not be executed.
321 Specifies the cipher to use for encrypting the session
322 in protocol version 1.
330 is only supported in the
332 client for interoperability with legacy protocol 1 implementations
333 that do not support the
336 Its use is strongly discouraged due to cryptographic weaknesses.
340 Specifies the ciphers allowed for protocol version 2
341 in order of preference.
342 Multiple ciphers must be comma-separated.
343 The supported ciphers are:
345 .Bl -item -compact -offset indent
361 aes128-gcm@openssh.com
363 aes256-gcm@openssh.com
375 chacha20-poly1305@openssh.com
379 .Bd -literal -offset indent
380 aes128-ctr,aes192-ctr,aes256-ctr,
381 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
382 chacha20-poly1305@openssh.com,
383 arcfour256,arcfour128,
384 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,
385 aes192-cbc,aes256-cbc,arcfour
388 The list of available ciphers may also be obtained using the
392 .It Cm ClearAllForwardings
393 Specifies that all local, remote, and dynamic port forwardings
394 specified in the configuration files or on the command line be
396 This option is primarily useful when used from the
398 command line to clear port forwardings set in
399 configuration files, and is automatically set by
410 Specifies whether to use compression.
417 .It Cm CompressionLevel
418 Specifies the compression level to use if compression is enabled.
419 The argument must be an integer from 1 (fast) to 9 (slow, best).
420 The default level is 6, which is good for most applications.
421 The meaning of the values is the same as in
423 Note that this option applies to protocol version 1 only.
424 .It Cm ConnectionAttempts
425 Specifies the number of tries (one per second) to make before exiting.
426 The argument must be an integer.
427 This may be useful in scripts if the connection sometimes fails.
429 .It Cm ConnectTimeout
430 Specifies the timeout (in seconds) used when connecting to the
431 SSH server, instead of using the default system TCP timeout.
432 This value is used only when the target is down or really unreachable,
433 not when it refuses the connection.
435 Enables the sharing of multiple sessions over a single network connection.
439 will listen for connections on a control socket specified using the
442 Additional sessions can connect to this socket using the same
449 These sessions will try to reuse the master instance's network connection
450 rather than initiating new ones, but will fall back to connecting normally
451 if the control socket does not exist, or is not listening.
456 to listen for control connections, but require confirmation using the
458 program before they are accepted (see
464 ssh will continue without connecting to a master instance.
468 forwarding is supported over these multiplexed connections, however the
469 display and agent forwarded will be the one belonging to the master
470 connection i.e. it is not possible to forward multiple displays or agents.
472 Two additional options allow for opportunistic multiplexing: try to use a
473 master connection but fall back to creating a new one if one does not already
479 The latter requires confirmation like the
483 Specify the path to the control socket used for connection sharing as described
486 section above or the string
488 to disable connection sharing.
491 will be substituted by the first component of the local host name,
493 will be substituted by the local host name (including any domain name),
495 will be substituted by the target host name,
497 will be substituted by the original target host name
498 specified on the command line,
500 the destination port,
502 by the remote login username,
504 by the username of the user running
507 by a hash of the concatenation: %l%h%p%r.
508 It is recommended that any
510 used for opportunistic connection sharing include
511 at least %h, %p, and %r (or alternatively %C).
512 This ensures that shared connections are uniquely identified.
513 .It Cm ControlPersist
514 When used in conjunction with
516 specifies that the master connection should remain open
517 in the background (waiting for future client connections)
518 after the initial client connection has been closed.
521 then the master connection will not be placed into the background,
522 and will close as soon as the initial client connection is closed.
525 then the master connection will remain in the background indefinitely
526 (until killed or closed via a mechanism such as the
530 If set to a time in seconds, or a time in any of the formats documented in
532 then the backgrounded master connection will automatically terminate
533 after it has remained idle (with no client connections) for the
535 .It Cm DynamicForward
536 Specifies that a TCP port on the local machine be forwarded
537 over the secure channel, and the application
538 protocol is then used to determine where to connect to from the
543 .Oo Ar bind_address : Oc Ar port .
545 IPv6 addresses can be specified by enclosing addresses in square brackets.
546 By default, the local port is bound in accordance with the
551 may be used to bind the connection to a specific address.
556 indicates that the listening port be bound for local use only, while an
559 indicates that the port should be available from all interfaces.
561 Currently the SOCKS4 and SOCKS5 protocols are supported, and
563 will act as a SOCKS server.
564 Multiple forwardings may be specified, and
565 additional forwardings can be given on the command line.
566 Only the superuser can forward privileged ports.
567 .It Cm EnableSSHKeysign
568 Setting this option to
570 in the global client configuration file
571 .Pa /etc/ssh/ssh_config
572 enables the use of the helper program
575 .Cm HostbasedAuthentication .
582 This option should be placed in the non-hostspecific section.
585 for more information.
587 Sets the escape character (default:
589 The escape character can also
590 be set on the command line.
591 The argument should be a single character,
593 followed by a letter, or
595 to disable the escape
596 character entirely (making the connection transparent for binary
598 .It Cm ExitOnForwardFailure
601 should terminate the connection if it cannot set up all requested
602 dynamic, tunnel, local, and remote port forwardings.
610 Specifies whether the connection to the authentication agent (if any)
611 will be forwarded to the remote machine.
619 Agent forwarding should be enabled with caution.
620 Users with the ability to bypass file permissions on the remote host
621 (for the agent's Unix-domain socket)
622 can access the local agent through the forwarded connection.
623 An attacker cannot obtain key material from the agent,
624 however they can perform operations on the keys that enable them to
625 authenticate using the identities loaded into the agent.
627 Specifies whether X11 connections will be automatically redirected
628 over the secure channel and
638 X11 forwarding should be enabled with caution.
639 Users with the ability to bypass file permissions on the remote host
640 (for the user's X11 authorization database)
641 can access the local X11 display through the forwarded connection.
642 An attacker may then be able to perform activities such as keystroke monitoring
644 .Cm ForwardX11Trusted
645 option is also enabled.
646 .It Cm ForwardX11Timeout
647 Specify a timeout for untrusted X11 forwarding
648 using the format described in the
649 TIME FORMATS section of
651 X11 connections received by
653 after this time will be refused.
654 The default is to disable untrusted X11 forwarding after twenty minutes has
656 .It Cm ForwardX11Trusted
657 If this option is set to
659 remote X11 clients will have full access to the original X11 display.
661 If this option is set to
663 remote X11 clients will be considered untrusted and prevented
664 from stealing or tampering with data belonging to trusted X11
668 token used for the session will be set to expire after 20 minutes.
669 Remote clients will be refused access after this time.
674 See the X11 SECURITY extension specification for full details on
675 the restrictions imposed on untrusted clients.
677 Specifies whether remote hosts are allowed to connect to local
681 binds local port forwardings to the loopback address.
682 This prevents other remote hosts from connecting to forwarded ports.
684 can be used to specify that ssh
685 should bind local port forwardings to the wildcard address,
686 thus allowing remote hosts to connect to forwarded ports.
693 .It Cm GlobalKnownHostsFile
694 Specifies one or more files to use for the global
695 host key database, separated by whitespace.
697 .Pa /etc/ssh/ssh_known_hosts ,
698 .Pa /etc/ssh/ssh_known_hosts2 .
699 .It Cm GSSAPIAuthentication
700 Specifies whether user authentication based on GSSAPI is allowed.
703 Note that this option applies to protocol version 2 only.
704 .It Cm GSSAPIDelegateCredentials
705 Forward (delegate) credentials to the server.
708 Note that this option applies to protocol version 2 only.
709 .It Cm HashKnownHosts
712 should hash host names and addresses when they are added to
713 .Pa ~/.ssh/known_hosts .
714 These hashed names may be used normally by
718 but they do not reveal identifying information should the file's contents
722 Note that existing names and addresses in known hosts files
723 will not be converted automatically,
724 but may be manually hashed using
726 .It Cm HostbasedAuthentication
727 Specifies whether to try rhosts based authentication with public key
735 This option applies to protocol version 2 only and
737 .Cm RhostsRSAAuthentication .
738 .It Cm HostKeyAlgorithms
739 Specifies the protocol version 2 host key algorithms
740 that the client wants to use in order of preference.
741 The default for this option is:
742 .Bd -literal -offset 3n
743 ecdsa-sha2-nistp256-cert-v01@openssh.com,
744 ecdsa-sha2-nistp384-cert-v01@openssh.com,
745 ecdsa-sha2-nistp521-cert-v01@openssh.com,
746 ssh-ed25519-cert-v01@openssh.com,
747 ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,
748 ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,
749 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
750 ssh-ed25519,ssh-rsa,ssh-dss
753 If hostkeys are known for the destination host then this default is modified
754 to prefer their algorithms.
756 Specifies an alias that should be used instead of the
757 real host name when looking up or saving the host key
758 in the host key database files.
759 This option is useful for tunneling SSH connections
760 or for multiple servers running on a single host.
762 Specifies the real host name to log into.
763 This can be used to specify nicknames or abbreviations for hosts.
764 If the hostname contains the character sequence
766 then this will be replaced with the host name specified on the command line
767 (this is useful for manipulating unqualified names).
768 The character sequence
770 will be replaced by a single
772 character, which may be used when specifying IPv6 link-local addresses.
774 The default is the name given on the command line.
775 Numeric IP addresses are also permitted (both on the command line and in
778 .It Cm IdentitiesOnly
781 should only use the authentication identity files configured in the
788 offers more identities.
789 The argument to this keyword must be
793 This option is intended for situations where ssh-agent
794 offers many different identities.
798 Specifies a file from which the user's DSA, ECDSA, ED25519 or RSA authentication
802 for protocol version 1, and
804 .Pa ~/.ssh/id_ecdsa ,
805 .Pa ~/.ssh/id_ed25519
808 for protocol version 2.
809 Additionally, any identities represented by the authentication agent
810 will be used for authentication unless
814 will try to load certificate information from the filename obtained by
817 to the path of a specified
820 The file name may use the tilde
821 syntax to refer to a user's home directory or one of the following
824 (local user's home directory),
830 (remote host name) or
834 It is possible to have
835 multiple identity files specified in configuration files; all these
836 identities will be tried in sequence.
839 directives will add to the list of identities tried (this behaviour
840 differs from that of other configuration directives).
843 may be used in conjunction with
845 to select which identities in an agent are offered during authentication.
847 Specifies a pattern-list of unknown options to be ignored if they are
848 encountered in configuration parsing.
849 This may be used to suppress errors if
851 contains options that are unrecognised by
853 It is recommended that
855 be listed early in the configuration file as it will not be applied
856 to unknown options that appear before it.
858 Specifies the IPv4 type-of-service or DSCP class for connections.
885 This option may take one or two arguments, separated by whitespace.
886 If one argument is specified, it is used as the packet class unconditionally.
887 If two values are specified, the first is automatically selected for
888 interactive sessions and the second for non-interactive sessions.
891 for interactive sessions and
893 for non-interactive sessions.
894 .It Cm KbdInteractiveAuthentication
895 Specifies whether to use keyboard-interactive authentication.
896 The argument to this keyword must be
902 .It Cm KbdInteractiveDevices
903 Specifies the list of methods to use in keyboard-interactive authentication.
904 Multiple method names must be comma-separated.
905 The default is to use the server specified list.
906 The methods available vary depending on what the server supports.
907 For an OpenSSH server,
908 it may be zero or more of:
914 Specifies the available KEX (Key Exchange) algorithms.
915 Multiple algorithms must be comma-separated.
917 .Bd -literal -offset indent
918 curve25519-sha256@libssh.org,
919 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
920 diffie-hellman-group-exchange-sha256,
921 diffie-hellman-group14-sha1,
922 diffie-hellman-group-exchange-sha1,
923 diffie-hellman-group1-sha1
926 Specifies a command to execute on the local machine after successfully
927 connecting to the server.
928 The command string extends to the end of the line, and is executed with
930 The following escape character substitutions will be performed:
932 (local user's home directory),
938 (host name as provided on the command line),
942 (remote user name) or
946 by a hash of the concatenation: %l%h%p%r.
948 The command is run synchronously and does not have access to the
952 It should not be used for interactive commands.
954 This directive is ignored unless
955 .Cm PermitLocalCommand
958 Specifies that a TCP port on the local machine be forwarded over
959 the secure channel to the specified host and port from the remote machine.
960 The first argument must be
962 .Oo Ar bind_address : Oc Ar port
964 and the second argument must be
965 .Ar host : Ns Ar hostport .
966 IPv6 addresses can be specified by enclosing addresses in square brackets.
967 Multiple forwardings may be specified, and additional forwardings can be
968 given on the command line.
969 Only the superuser can forward privileged ports.
970 By default, the local port is bound in accordance with the
975 may be used to bind the connection to a specific address.
980 indicates that the listening port be bound for local use only, while an
983 indicates that the port should be available from all interfaces.
985 Gives the verbosity level that is used when logging messages from
987 The possible values are:
988 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
990 DEBUG and DEBUG1 are equivalent.
991 DEBUG2 and DEBUG3 each specify higher levels of verbose output.
993 Specifies the MAC (message authentication code) algorithms
994 in order of preference.
995 The MAC algorithm is used in protocol version 2
996 for data integrity protection.
997 Multiple algorithms must be comma-separated.
998 The algorithms that contain
1000 calculate the MAC after encryption (encrypt-then-mac).
1001 These are considered safer and their use recommended.
1003 .Bd -literal -offset indent
1004 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
1005 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1006 umac-64@openssh.com,umac-128@openssh.com,
1007 hmac-sha2-256,hmac-sha2-512,
1008 hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
1009 hmac-ripemd160-etm@openssh.com,
1010 hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,
1011 hmac-md5,hmac-sha1,hmac-ripemd160,
1012 hmac-sha1-96,hmac-md5-96
1014 .It Cm NoHostAuthenticationForLocalhost
1015 This option can be used if the home directory is shared across machines.
1016 In this case localhost will refer to a different machine on each of
1017 the machines and the user will get many warnings about changed host keys.
1018 However, this option disables host authentication for localhost.
1019 The argument to this keyword must be
1023 The default is to check the host key for localhost.
1024 .It Cm NumberOfPasswordPrompts
1025 Specifies the number of password prompts before giving up.
1026 The argument to this keyword must be an integer.
1028 .It Cm PasswordAuthentication
1029 Specifies whether to use password authentication.
1030 The argument to this keyword must be
1036 .It Cm PermitLocalCommand
1037 Allow local command execution via the
1040 .Ic !\& Ns Ar command
1043 The argument must be
1049 .It Cm PKCS11Provider
1050 Specifies which PKCS#11 provider to use.
1051 The argument to this keyword is the PKCS#11 shared library
1053 should use to communicate with a PKCS#11 token providing the user's
1056 Specifies the port number to connect on the remote host.
1058 .It Cm PreferredAuthentications
1059 Specifies the order in which the client should try protocol 2
1060 authentication methods.
1061 This allows a client to prefer one method (e.g.\&
1062 .Cm keyboard-interactive )
1063 over another method (e.g.\&
1066 .Bd -literal -offset indent
1067 gssapi-with-mic,hostbased,publickey,
1068 keyboard-interactive,password
1071 Specifies the protocol versions
1073 should support in order of preference.
1074 The possible values are
1078 Multiple versions must be comma-separated.
1079 When this option is set to
1082 will try version 2 and fall back to version 1
1083 if version 2 is not available.
1087 Specifies the command to use to connect to the server.
1089 string extends to the end of the line, and is executed
1090 using the user's shell
1092 directive to avoid a lingering shell process.
1094 In the command string, any occurrence of
1096 will be substituted by the host name to
1101 by the remote user name.
1102 The command can be basically anything,
1103 and should read from its standard input and write to its standard output.
1104 It should eventually connect an
1106 server running on some machine, or execute
1109 Host key management will be done using the
1110 HostName of the host being connected (defaulting to the name typed by
1112 Setting the command to
1114 disables this option entirely.
1117 is not available for connects with a proxy command.
1119 This directive is useful in conjunction with
1121 and its proxy support.
1122 For example, the following directive would connect via an HTTP proxy at
1124 .Bd -literal -offset 3n
1125 ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
1127 .It Cm ProxyUseFdpass
1130 will pass a connected file descriptor back to
1132 instead of continuing to execute and pass data.
1135 .It Cm PubkeyAuthentication
1136 Specifies whether to try public key authentication.
1137 The argument to this keyword must be
1143 This option applies to protocol version 2 only.
1145 Specifies the maximum amount of data that may be transmitted before the
1146 session key is renegotiated, optionally followed a maximum amount of
1147 time that may pass before the session key is renegotiated.
1148 The first argument is specified in bytes and may have a suffix of
1153 to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1154 The default is between
1158 depending on the cipher.
1159 The optional second value is specified in seconds and may use any of the
1160 units documented in the
1161 TIME FORMATS section of
1163 The default value for
1167 which means that rekeying is performed after the cipher's default amount
1168 of data has been sent or received and no time based rekeying is done.
1169 This option applies to protocol version 2 only.
1170 .It Cm RemoteForward
1171 Specifies that a TCP port on the remote machine be forwarded over
1172 the secure channel to the specified host and port from the local machine.
1173 The first argument must be
1175 .Oo Ar bind_address : Oc Ar port
1177 and the second argument must be
1178 .Ar host : Ns Ar hostport .
1179 IPv6 addresses can be specified by enclosing addresses in square brackets.
1180 Multiple forwardings may be specified, and additional
1181 forwardings can be given on the command line.
1182 Privileged ports can be forwarded only when
1183 logging in as root on the remote machine.
1189 the listen port will be dynamically allocated on the server and reported
1190 to the client at run time.
1194 is not specified, the default is to only bind to loopback addresses.
1199 or an empty string, then the forwarding is requested to listen on all
1203 will only succeed if the server's
1205 option is enabled (see
1206 .Xr sshd_config 5 ) .
1208 Specifies whether to request a pseudo-tty for the session.
1209 The argument may be one of:
1211 (never request a TTY),
1213 (always request a TTY when standard input is a TTY),
1215 (always request a TTY) or
1217 (request a TTY when opening a login session).
1218 This option mirrors the
1224 .It Cm RhostsRSAAuthentication
1225 Specifies whether to try rhosts based authentication with RSA host
1227 The argument must be
1233 This option applies to protocol version 1 only and requires
1236 .It Cm RSAAuthentication
1237 Specifies whether to try RSA authentication.
1238 The argument to this keyword must be
1242 RSA authentication will only be
1243 attempted if the identity file exists, or an authentication agent is
1247 Note that this option applies to protocol version 1 only.
1249 Specifies what variables from the local
1251 should be sent to the server.
1252 Note that environment passing is only supported for protocol 2.
1253 The server must also support it, and the server must be configured to
1254 accept these environment variables.
1259 for how to configure the server.
1260 Variables are specified by name, which may contain wildcard characters.
1261 Multiple environment variables may be separated by whitespace or spread
1265 The default is not to send any environment variables.
1269 for more information on patterns.
1270 .It Cm ServerAliveCountMax
1271 Sets the number of server alive messages (see below) which may be
1274 receiving any messages back from the server.
1275 If this threshold is reached while server alive messages are being sent,
1276 ssh will disconnect from the server, terminating the session.
1277 It is important to note that the use of server alive messages is very
1281 The server alive messages are sent through the encrypted channel
1282 and therefore will not be spoofable.
1283 The TCP keepalive option enabled by
1286 The server alive mechanism is valuable when the client or
1287 server depend on knowing when a connection has become inactive.
1289 The default value is 3.
1291 .Cm ServerAliveInterval
1292 (see below) is set to 15 and
1293 .Cm ServerAliveCountMax
1294 is left at the default, if the server becomes unresponsive,
1295 ssh will disconnect after approximately 45 seconds.
1296 This option applies to protocol version 2 only.
1297 .It Cm ServerAliveInterval
1298 Sets a timeout interval in seconds after which if no data has been received
1301 will send a message through the encrypted
1302 channel to request a response from the server.
1304 is 0, indicating that these messages will not be sent to the server.
1305 This option applies to protocol version 2 only.
1306 .It Cm StreamLocalBindMask
1307 Sets the octal file creation mode mask
1309 used when creating a Unix-domain socket file for local or remote
1311 This option is only used for port forwarding to a Unix-domain socket file.
1313 The default value is 0177, which creates a Unix-domain socket file that is
1314 readable and writable only by the owner.
1315 Note that not all operating systems honor the file mode on Unix-domain
1317 .It Cm StreamLocalBindUnlink
1318 Specifies whether to remove an existing Unix-domain socket file for local
1319 or remote port forwarding before creating a new one.
1320 If the socket file already exists and
1321 .Cm StreamLocalBindUnlink
1324 will be unable to forward the port to the Unix-domain socket file.
1325 This option is only used for port forwarding to a Unix-domain socket file.
1327 The argument must be
1333 .It Cm StrictHostKeyChecking
1334 If this flag is set to
1337 will never automatically add host keys to the
1338 .Pa ~/.ssh/known_hosts
1339 file, and refuses to connect to hosts whose host key has changed.
1340 This provides maximum protection against trojan horse attacks,
1341 though it can be annoying when the
1342 .Pa /etc/ssh/ssh_known_hosts
1343 file is poorly maintained or when connections to new hosts are
1345 This option forces the user to manually
1347 If this flag is set to
1349 ssh will automatically add new host keys to the
1350 user known hosts files.
1351 If this flag is set to
1354 will be added to the user known host files only after the user
1355 has confirmed that is what they really want to do, and
1356 ssh will refuse to connect to hosts whose host key has changed.
1358 known hosts will be verified automatically in all cases.
1359 The argument must be
1367 Specifies whether the system should send TCP keepalive messages to the
1369 If they are sent, death of the connection or crash of one
1370 of the machines will be properly noticed.
1371 However, this means that
1372 connections will die if the route is down temporarily, and some people
1377 (to send TCP keepalive messages), and the client will notice
1378 if the network goes down or the remote host dies.
1379 This is important in scripts, and many users want it too.
1381 To disable TCP keepalive messages, the value should be set to
1386 device forwarding between the client and the server.
1387 The argument must be
1397 requests the default tunnel mode, which is
1398 .Dq point-to-point .
1404 devices to open on the client
1409 The argument must be
1411 .Ar local_tun Op : Ar remote_tun .
1413 The devices may be specified by numerical ID or the keyword
1415 which uses the next available tunnel device.
1418 is not specified, it defaults to
1422 .It Cm UsePrivilegedPort
1423 Specifies whether to use a privileged port for outgoing connections.
1424 The argument must be
1433 must be setuid root.
1434 Note that this option must be set to
1437 .Cm RhostsRSAAuthentication
1440 Specifies the user to log in as.
1441 This can be useful when a different user name is used on different machines.
1442 This saves the trouble of
1443 having to remember to give the user name on the command line.
1444 .It Cm UserKnownHostsFile
1445 Specifies one or more files to use for the user
1446 host key database, separated by whitespace.
1448 .Pa ~/.ssh/known_hosts ,
1449 .Pa ~/.ssh/known_hosts2 .
1450 .It Cm VerifyHostKeyDNS
1451 Specifies whether to verify the remote key using DNS and SSHFP resource
1453 If this option is set to
1455 the client will implicitly trust keys that match a secure fingerprint
1457 Insecure fingerprints will be handled as if this option was set to
1459 If this option is set to
1461 information on fingerprint match will be displayed, but the user will still
1462 need to confirm new host keys according to the
1463 .Cm StrictHostKeyChecking
1465 The argument must be
1472 Note that this option applies to protocol version 2 only.
1474 See also VERIFYING HOST KEYS in
1476 .It Cm VersionAddendum
1477 Specifies a string to append to the regular version string to identify
1478 OS- or site-specific modifications.
1480 .Dq DragonFly-20150122 .
1481 .It Cm VisualHostKey
1482 If this flag is set to
1484 an ASCII art representation of the remote host key fingerprint is
1485 printed in addition to the hex fingerprint string at login and
1486 for unknown host keys.
1487 If this flag is set to
1489 no fingerprint strings are printed at login and
1490 only the hex fingerprint string will be printed for unknown host keys.
1493 .It Cm XAuthLocation
1494 Specifies the full pathname of the
1498 .Pa /usr/X11R6/bin/xauth .
1503 consists of zero or more non-whitespace characters,
1505 (a wildcard that matches zero or more characters),
1508 (a wildcard that matches exactly one character).
1509 For example, to specify a set of declarations for any host in the
1512 the following pattern could be used:
1516 The following pattern
1517 would match any host in the 192.168.0.[0-9] network range:
1519 .Dl Host 192.168.0.?
1523 is a comma-separated list of patterns.
1524 Patterns within pattern-lists may be negated
1525 by preceding them with an exclamation mark
1528 to allow a key to be used from anywhere within an organization
1532 the following entry (in authorized_keys) could be used:
1534 .Dl from=\&"!*.dialup.example.com,*.example.com\&"
1537 .It Pa ~/.ssh/config
1538 This is the per-user configuration file.
1539 The format of this file is described above.
1540 This file is used by the SSH client.
1541 Because of the potential for abuse, this file must have strict permissions:
1542 read/write for the user, and not accessible by others.
1543 .It Pa /etc/ssh/ssh_config
1544 Systemwide configuration file.
1545 This file provides defaults for those
1546 values that are not specified in the user's configuration file, and
1547 for those users who do not have a configuration file.
1548 This file must be world-readable.
1553 OpenSSH is a derivative of the original and free
1554 ssh 1.2.12 release by Tatu Ylonen.
1555 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1556 Theo de Raadt and Dug Song
1557 removed many bugs, re-added newer features and
1559 Markus Friedl contributed the support for SSH
1560 protocol versions 1.5 and 2.0.