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.185 2014/02/23 20:11:36 djm Exp $
43 .Nd OpenSSH SSH client configuration files
46 .Nm /etc/ssh/ssh_config
49 obtains configuration data from the following sources in
52 .Bl -enum -offset indent -compact
56 user's configuration file
59 system-wide configuration file
60 .Pq Pa /etc/ssh/ssh_config
63 For each parameter, the first obtained value
65 The configuration files contain sections separated by
67 specifications, and that section is only applied for hosts that
68 match one of the patterns given in the specification.
69 The matched host name is the one given on the command line.
71 Since the first obtained value for each parameter is used, more
72 host-specific declarations should be given near the beginning of the
73 file, and general defaults at the end.
75 The configuration file has the following format:
77 Empty lines and lines starting with
80 Otherwise a line is of the format
81 .Dq keyword arguments .
82 Configuration options may be separated by whitespace or
83 optional whitespace and exactly one
85 the latter format is useful to avoid the need to quote whitespace
86 when specifying configuration options using the
93 Arguments may optionally be enclosed in double quotes
95 in order to represent arguments containing spaces.
98 keywords and their meanings are as follows (note that
99 keywords are case-insensitive and arguments are case-sensitive):
102 Restricts the following declarations (up to the next
106 keyword) to be only for those hosts that match one of the patterns
107 given after the keyword.
108 If more than one pattern is provided, they should be separated by whitespace.
111 as a pattern can be used to provide global
112 defaults for all hosts.
115 argument given on the command line (i.e. the name is not converted to
116 a canonicalized host name before matching).
118 A pattern entry may be negated by prefixing it with an exclamation mark
120 If a negated entry is matched, then the
122 entry is ignored, regardless of whether any other patterns on the line
124 Negated matches are therefore useful to provide exceptions for wildcard
129 for more information on patterns.
131 Restricts the following declarations (up to the next
135 keyword) to be used only when the conditions following the
137 keyword are satisfied.
138 Match conditions are specified using one or more keyword/criteria pairs
141 which matches all criteria.
142 The available keywords are:
152 keyword executes the specified command under the user's shell.
153 If the command returns a zero exit status then the condition is considered true.
154 Commands containing whitespace characters must be quoted.
155 The following character sequences in the command will be expanded prior to
158 will be substituted by the first component of the local host name,
160 will be substituted by the local host name (including any domain name),
162 will be substituted by the target host name,
164 will be substituted by the original target host name
165 specified on the command-line,
167 the destination port,
169 by the remote login username, and
171 by the username of the user running
174 The other keywords' criteria must be single entries or comma-separated
175 lists and may use the wildcard and negation operators described in the
180 keyword are matched against the target hostname, after any substitution
186 keyword matches against the hostname as it was specified on the command-line.
189 keyword matches against the target username on the remote host.
192 keyword matches against the name of the local user running
194 (this keyword may be useful in system-wide
198 Specifies which address family to use when connecting.
208 passphrase/password querying will be disabled.
209 This option is useful in scripts and other batch jobs where no user
210 is present to supply the password.
218 Use the specified address on the local machine as the source address of
220 Only useful on systems with more than one address.
221 Note that this option does not work if
222 .Cm UsePrivilegedPort
225 .It Cm CanonicalDomains
227 .Cm CanonicalizeHostname
228 is enabled, this option specifies the list of domain suffixes in which to
229 search for the specified destination host.
230 .It Cm CanonicalizeFallbackLocal
231 Specifies whether to fail with an error when hostname canonicalization fails.
234 will attempt to look up the unqualified hostname using the system resolver's
241 .Cm CanonicalizeHostname
242 is enabled and the target hostname cannot be found in any of the domains
244 .Cm CanonicalDomains .
245 .It Cm CanonicalizeHostname
246 Controls whether explicit hostname canonicalization is performed.
249 is not to perform any name rewriting and let the system resolver handle all
253 then, for connections that do not use a
256 will attempt to canonicalize the hostname specified on the command line
260 .Cm CanonicalizePermittedCNAMEs
263 .Cm CanonicalizeHostname
266 then canonicalization is applied to proxied connections too.
268 If this option is enabled and canonicalisation results in the target hostname
269 changing, then the configuration files are processed again using the new
270 target name to pick up any new configuration in matching
273 .It Cm CanonicalizeMaxDots
274 Specifies the maximum number of dot characters in a hostname before
275 canonicalization is disabled.
278 allows a single dot (i.e. hostname.subdomain).
279 .It Cm CanonicalizePermittedCNAMEs
280 Specifies rules to determine whether CNAMEs should be followed when
281 canonicalizing hostnames.
282 The rules consist of one or more arguments of
283 .Ar source_domain_list : Ns Ar target_domain_list ,
285 .Ar source_domain_list
286 is a pattern-list of domains that may follow CNAMEs in canonicalization,
288 .Ar target_domain_list
289 is a pattern-list of domains that they may resolve to.
292 .Dq *.a.example.com:*.b.example.com,*.c.example.com
293 will allow hostnames matching
295 to be canonicalized to names in the
300 .It Cm ChallengeResponseAuthentication
301 Specifies whether to use challenge-response authentication.
302 The argument to this keyword must be
309 If this flag is set to
312 will additionally check the host IP address in the
315 This allows ssh to detect if a host key changed due to DNS spoofing.
316 If the option is set to
318 the check will not be executed.
322 Specifies the cipher to use for encrypting the session
323 in protocol version 1.
331 is only supported in the
333 client for interoperability with legacy protocol 1 implementations
334 that do not support the
337 Its use is strongly discouraged due to cryptographic weaknesses.
341 Specifies the ciphers allowed for protocol version 2
342 in order of preference.
343 Multiple ciphers must be comma-separated.
344 The supported ciphers are:
353 .Dq aes128-gcm@openssh.com ,
354 .Dq aes256-gcm@openssh.com ,
361 .Dq chacha20-poly1305@openssh.com .
364 .Bd -literal -offset 3n
365 aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
366 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
367 chacha20-poly1305@openssh.com,
368 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
372 The list of available ciphers may also be obtained using the
376 .It Cm ClearAllForwardings
377 Specifies that all local, remote, and dynamic port forwardings
378 specified in the configuration files or on the command line be
380 This option is primarily useful when used from the
382 command line to clear port forwardings set in
383 configuration files, and is automatically set by
394 Specifies whether to use compression.
401 .It Cm CompressionLevel
402 Specifies the compression level to use if compression is enabled.
403 The argument must be an integer from 1 (fast) to 9 (slow, best).
404 The default level is 6, which is good for most applications.
405 The meaning of the values is the same as in
407 Note that this option applies to protocol version 1 only.
408 .It Cm ConnectionAttempts
409 Specifies the number of tries (one per second) to make before exiting.
410 The argument must be an integer.
411 This may be useful in scripts if the connection sometimes fails.
413 .It Cm ConnectTimeout
414 Specifies the timeout (in seconds) used when connecting to the
415 SSH server, instead of using the default system TCP timeout.
416 This value is used only when the target is down or really unreachable,
417 not when it refuses the connection.
419 Enables the sharing of multiple sessions over a single network connection.
423 will listen for connections on a control socket specified using the
426 Additional sessions can connect to this socket using the same
433 These sessions will try to reuse the master instance's network connection
434 rather than initiating new ones, but will fall back to connecting normally
435 if the control socket does not exist, or is not listening.
440 to listen for control connections, but require confirmation using the
442 program before they are accepted (see
448 ssh will continue without connecting to a master instance.
452 forwarding is supported over these multiplexed connections, however the
453 display and agent forwarded will be the one belonging to the master
454 connection i.e. it is not possible to forward multiple displays or agents.
456 Two additional options allow for opportunistic multiplexing: try to use a
457 master connection but fall back to creating a new one if one does not already
463 The latter requires confirmation like the
467 Specify the path to the control socket used for connection sharing as described
470 section above or the string
472 to disable connection sharing.
475 will be substituted by the first component of the local host name,
477 will be substituted by the local host name (including any domain name),
479 will be substituted by the target host name,
481 will be substituted by the original target host name
482 specified on the command line,
484 the destination port,
486 by the remote login username, and
488 by the username of the user running
490 It is recommended that any
492 used for opportunistic connection sharing include
493 at least %h, %p, and %r.
494 This ensures that shared connections are uniquely identified.
495 .It Cm ControlPersist
496 When used in conjunction with
498 specifies that the master connection should remain open
499 in the background (waiting for future client connections)
500 after the initial client connection has been closed.
503 then the master connection will not be placed into the background,
504 and will close as soon as the initial client connection is closed.
507 then the master connection will remain in the background indefinitely
508 (until killed or closed via a mechanism such as the
512 If set to a time in seconds, or a time in any of the formats documented in
514 then the backgrounded master connection will automatically terminate
515 after it has remained idle (with no client connections) for the
517 .It Cm DynamicForward
518 Specifies that a TCP port on the local machine be forwarded
519 over the secure channel, and the application
520 protocol is then used to determine where to connect to from the
525 .Oo Ar bind_address : Oc Ar port .
527 IPv6 addresses can be specified by enclosing addresses in square brackets.
528 By default, the local port is bound in accordance with the
533 may be used to bind the connection to a specific address.
538 indicates that the listening port be bound for local use only, while an
541 indicates that the port should be available from all interfaces.
543 Currently the SOCKS4 and SOCKS5 protocols are supported, and
545 will act as a SOCKS server.
546 Multiple forwardings may be specified, and
547 additional forwardings can be given on the command line.
548 Only the superuser can forward privileged ports.
549 .It Cm EnableSSHKeysign
550 Setting this option to
552 in the global client configuration file
553 .Pa /etc/ssh/ssh_config
554 enables the use of the helper program
557 .Cm HostbasedAuthentication .
564 This option should be placed in the non-hostspecific section.
567 for more information.
569 Sets the escape character (default:
571 The escape character can also
572 be set on the command line.
573 The argument should be a single character,
575 followed by a letter, or
577 to disable the escape
578 character entirely (making the connection transparent for binary
580 .It Cm ExitOnForwardFailure
583 should terminate the connection if it cannot set up all requested
584 dynamic, tunnel, local, and remote port forwardings.
592 Specifies whether the connection to the authentication agent (if any)
593 will be forwarded to the remote machine.
601 Agent forwarding should be enabled with caution.
602 Users with the ability to bypass file permissions on the remote host
603 (for the agent's Unix-domain socket)
604 can access the local agent through the forwarded connection.
605 An attacker cannot obtain key material from the agent,
606 however they can perform operations on the keys that enable them to
607 authenticate using the identities loaded into the agent.
609 Specifies whether X11 connections will be automatically redirected
610 over the secure channel and
620 X11 forwarding should be enabled with caution.
621 Users with the ability to bypass file permissions on the remote host
622 (for the user's X11 authorization database)
623 can access the local X11 display through the forwarded connection.
624 An attacker may then be able to perform activities such as keystroke monitoring
626 .Cm ForwardX11Trusted
627 option is also enabled.
628 .It Cm ForwardX11Timeout
629 Specify a timeout for untrusted X11 forwarding
630 using the format described in the
631 TIME FORMATS section of
633 X11 connections received by
635 after this time will be refused.
636 The default is to disable untrusted X11 forwarding after twenty minutes has
638 .It Cm ForwardX11Trusted
639 If this option is set to
641 remote X11 clients will have full access to the original X11 display.
643 If this option is set to
645 remote X11 clients will be considered untrusted and prevented
646 from stealing or tampering with data belonging to trusted X11
650 token used for the session will be set to expire after 20 minutes.
651 Remote clients will be refused access after this time.
656 See the X11 SECURITY extension specification for full details on
657 the restrictions imposed on untrusted clients.
659 Specifies whether remote hosts are allowed to connect to local
663 binds local port forwardings to the loopback address.
664 This prevents other remote hosts from connecting to forwarded ports.
666 can be used to specify that ssh
667 should bind local port forwardings to the wildcard address,
668 thus allowing remote hosts to connect to forwarded ports.
675 .It Cm GlobalKnownHostsFile
676 Specifies one or more files to use for the global
677 host key database, separated by whitespace.
679 .Pa /etc/ssh/ssh_known_hosts ,
680 .Pa /etc/ssh/ssh_known_hosts2 .
681 .It Cm GSSAPIAuthentication
682 Specifies whether user authentication based on GSSAPI is allowed.
685 Note that this option applies to protocol version 2 only.
686 .It Cm GSSAPIDelegateCredentials
687 Forward (delegate) credentials to the server.
690 Note that this option applies to protocol version 2 only.
691 .It Cm HashKnownHosts
694 should hash host names and addresses when they are added to
695 .Pa ~/.ssh/known_hosts .
696 These hashed names may be used normally by
700 but they do not reveal identifying information should the file's contents
704 Note that existing names and addresses in known hosts files
705 will not be converted automatically,
706 but may be manually hashed using
708 .It Cm HostbasedAuthentication
709 Specifies whether to try rhosts based authentication with public key
717 This option applies to protocol version 2 only and
719 .Cm RhostsRSAAuthentication .
720 .It Cm HostKeyAlgorithms
721 Specifies the protocol version 2 host key algorithms
722 that the client wants to use in order of preference.
723 The default for this option is:
724 .Bd -literal -offset 3n
725 ecdsa-sha2-nistp256-cert-v01@openssh.com,
726 ecdsa-sha2-nistp384-cert-v01@openssh.com,
727 ecdsa-sha2-nistp521-cert-v01@openssh.com,
728 ssh-ed25519-cert-v01@openssh.com,
729 ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,
730 ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,
731 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
732 ssh-ed25519,ssh-rsa,ssh-dss
735 If hostkeys are known for the destination host then this default is modified
736 to prefer their algorithms.
738 Specifies an alias that should be used instead of the
739 real host name when looking up or saving the host key
740 in the host key database files.
741 This option is useful for tunneling SSH connections
742 or for multiple servers running on a single host.
744 Specifies the real host name to log into.
745 This can be used to specify nicknames or abbreviations for hosts.
746 If the hostname contains the character sequence
748 then this will be replaced with the host name specified on the command line
749 (this is useful for manipulating unqualified names).
750 The default is the name given on the command line.
751 Numeric IP addresses are also permitted (both on the command line and in
754 .It Cm IdentitiesOnly
757 should only use the authentication identity files configured in the
764 offers more identities.
765 The argument to this keyword must be
769 This option is intended for situations where ssh-agent
770 offers many different identities.
774 Specifies a file from which the user's DSA, ECDSA, ED25519 or RSA authentication
778 for protocol version 1, and
780 .Pa ~/.ssh/id_ecdsa ,
781 .Pa ~/.ssh/id_ed25519
784 for protocol version 2.
785 Additionally, any identities represented by the authentication agent
786 will be used for authentication unless
790 will try to load certificate information from the filename obtained by
793 to the path of a specified
796 The file name may use the tilde
797 syntax to refer to a user's home directory or one of the following
800 (local user's home directory),
806 (remote host name) or
810 It is possible to have
811 multiple identity files specified in configuration files; all these
812 identities will be tried in sequence.
815 directives will add to the list of identities tried (this behaviour
816 differs from that of other configuration directives).
819 may be used in conjunction with
821 to select which identities in an agent are offered during authentication.
823 Specifies a pattern-list of unknown options to be ignored if they are
824 encountered in configuration parsing.
825 This may be used to suppress errors if
827 contains options that are unrecognised by
829 It is recommended that
831 be listed early in the configuration file as it will not be applied
832 to unknown options that appear before it.
834 Specifies the IPv4 type-of-service or DSCP class for connections.
861 This option may take one or two arguments, separated by whitespace.
862 If one argument is specified, it is used as the packet class unconditionally.
863 If two values are specified, the first is automatically selected for
864 interactive sessions and the second for non-interactive sessions.
867 for interactive sessions and
869 for non-interactive sessions.
870 .It Cm KbdInteractiveAuthentication
871 Specifies whether to use keyboard-interactive authentication.
872 The argument to this keyword must be
878 .It Cm KbdInteractiveDevices
879 Specifies the list of methods to use in keyboard-interactive authentication.
880 Multiple method names must be comma-separated.
881 The default is to use the server specified list.
882 The methods available vary depending on what the server supports.
883 For an OpenSSH server,
884 it may be zero or more of:
890 Specifies the available KEX (Key Exchange) algorithms.
891 Multiple algorithms must be comma-separated.
893 .Bd -literal -offset indent
894 curve25519-sha256@libssh.org,
895 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
896 diffie-hellman-group-exchange-sha256,
897 diffie-hellman-group-exchange-sha1,
898 diffie-hellman-group14-sha1,
899 diffie-hellman-group1-sha1
902 Specifies a command to execute on the local machine after successfully
903 connecting to the server.
904 The command string extends to the end of the line, and is executed with
906 The following escape character substitutions will be performed:
908 (local user's home directory),
914 (host name as provided on the command line),
918 (remote user name) or
922 The command is run synchronously and does not have access to the
926 It should not be used for interactive commands.
928 This directive is ignored unless
929 .Cm PermitLocalCommand
932 Specifies that a TCP port on the local machine be forwarded over
933 the secure channel to the specified host and port from the remote machine.
934 The first argument must be
936 .Oo Ar bind_address : Oc Ar port
938 and the second argument must be
939 .Ar host : Ns Ar hostport .
940 IPv6 addresses can be specified by enclosing addresses in square brackets.
941 Multiple forwardings may be specified, and additional forwardings can be
942 given on the command line.
943 Only the superuser can forward privileged ports.
944 By default, the local port is bound in accordance with the
949 may be used to bind the connection to a specific address.
954 indicates that the listening port be bound for local use only, while an
957 indicates that the port should be available from all interfaces.
959 Gives the verbosity level that is used when logging messages from
961 The possible values are:
962 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
964 DEBUG and DEBUG1 are equivalent.
965 DEBUG2 and DEBUG3 each specify higher levels of verbose output.
967 Specifies the MAC (message authentication code) algorithms
968 in order of preference.
969 The MAC algorithm is used in protocol version 2
970 for data integrity protection.
971 Multiple algorithms must be comma-separated.
972 The algorithms that contain
974 calculate the MAC after encryption (encrypt-then-mac).
975 These are considered safer and their use recommended.
977 .Bd -literal -offset indent
978 hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
979 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
980 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
981 hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,
982 hmac-md5-96-etm@openssh.com,
983 hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
984 hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
985 hmac-sha1-96,hmac-md5-96
987 .It Cm NoHostAuthenticationForLocalhost
988 This option can be used if the home directory is shared across machines.
989 In this case localhost will refer to a different machine on each of
990 the machines and the user will get many warnings about changed host keys.
991 However, this option disables host authentication for localhost.
992 The argument to this keyword must be
996 The default is to check the host key for localhost.
997 .It Cm NumberOfPasswordPrompts
998 Specifies the number of password prompts before giving up.
999 The argument to this keyword must be an integer.
1001 .It Cm PasswordAuthentication
1002 Specifies whether to use password authentication.
1003 The argument to this keyword must be
1009 .It Cm PermitLocalCommand
1010 Allow local command execution via the
1013 .Ic !\& Ns Ar command
1016 The argument must be
1022 .It Cm PKCS11Provider
1023 Specifies which PKCS#11 provider to use.
1024 The argument to this keyword is the PKCS#11 shared library
1026 should use to communicate with a PKCS#11 token providing the user's
1029 Specifies the port number to connect on the remote host.
1031 .It Cm PreferredAuthentications
1032 Specifies the order in which the client should try protocol 2
1033 authentication methods.
1034 This allows a client to prefer one method (e.g.\&
1035 .Cm keyboard-interactive )
1036 over another method (e.g.\&
1039 .Bd -literal -offset indent
1040 gssapi-with-mic,hostbased,publickey,
1041 keyboard-interactive,password
1044 Specifies the protocol versions
1046 should support in order of preference.
1047 The possible values are
1051 Multiple versions must be comma-separated.
1052 When this option is set to
1055 will try version 2 and fall back to version 1
1056 if version 2 is not available.
1060 Specifies the command to use to connect to the server.
1062 string extends to the end of the line, and is executed with
1064 In the command string, any occurrence of
1066 will be substituted by the host name to
1071 by the remote user name.
1072 The command can be basically anything,
1073 and should read from its standard input and write to its standard output.
1074 It should eventually connect an
1076 server running on some machine, or execute
1079 Host key management will be done using the
1080 HostName of the host being connected (defaulting to the name typed by
1082 Setting the command to
1084 disables this option entirely.
1087 is not available for connects with a proxy command.
1089 This directive is useful in conjunction with
1091 and its proxy support.
1092 For example, the following directive would connect via an HTTP proxy at
1094 .Bd -literal -offset 3n
1095 ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
1097 .It Cm ProxyUseFdpass
1100 will pass a connected file descriptor back to
1102 instead of continuing to execute and pass data.
1105 .It Cm PubkeyAuthentication
1106 Specifies whether to try public key authentication.
1107 The argument to this keyword must be
1113 This option applies to protocol version 2 only.
1115 Specifies the maximum amount of data that may be transmitted before the
1116 session key is renegotiated, optionally followed a maximum amount of
1117 time that may pass before the session key is renegotiated.
1118 The first argument is specified in bytes and may have a suffix of
1123 to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1124 The default is between
1128 depending on the cipher.
1129 The optional second value is specified in seconds and may use any of the
1130 units documented in the
1131 TIME FORMATS section of
1133 The default value for
1137 which means that rekeying is performed after the cipher's default amount
1138 of data has been sent or received and no time based rekeying is done.
1139 This option applies to protocol version 2 only.
1140 .It Cm RemoteForward
1141 Specifies that a TCP port on the remote machine be forwarded over
1142 the secure channel to the specified host and port from the local machine.
1143 The first argument must be
1145 .Oo Ar bind_address : Oc Ar port
1147 and the second argument must be
1148 .Ar host : Ns Ar hostport .
1149 IPv6 addresses can be specified by enclosing addresses in square brackets.
1150 Multiple forwardings may be specified, and additional
1151 forwardings can be given on the command line.
1152 Privileged ports can be forwarded only when
1153 logging in as root on the remote machine.
1159 the listen port will be dynamically allocated on the server and reported
1160 to the client at run time.
1164 is not specified, the default is to only bind to loopback addresses.
1169 or an empty string, then the forwarding is requested to listen on all
1173 will only succeed if the server's
1175 option is enabled (see
1176 .Xr sshd_config 5 ) .
1178 Specifies whether to request a pseudo-tty for the session.
1179 The argument may be one of:
1181 (never request a TTY),
1183 (always request a TTY when standard input is a TTY),
1185 (always request a TTY) or
1187 (request a TTY when opening a login session).
1188 This option mirrors the
1194 .It Cm RhostsRSAAuthentication
1195 Specifies whether to try rhosts based authentication with RSA host
1197 The argument must be
1203 This option applies to protocol version 1 only and requires
1206 .It Cm RSAAuthentication
1207 Specifies whether to try RSA authentication.
1208 The argument to this keyword must be
1212 RSA authentication will only be
1213 attempted if the identity file exists, or an authentication agent is
1217 Note that this option applies to protocol version 1 only.
1219 Specifies what variables from the local
1221 should be sent to the server.
1222 Note that environment passing is only supported for protocol 2.
1223 The server must also support it, and the server must be configured to
1224 accept these environment variables.
1229 for how to configure the server.
1230 Variables are specified by name, which may contain wildcard characters.
1231 Multiple environment variables may be separated by whitespace or spread
1235 The default is not to send any environment variables.
1239 for more information on patterns.
1240 .It Cm ServerAliveCountMax
1241 Sets the number of server alive messages (see below) which may be
1244 receiving any messages back from the server.
1245 If this threshold is reached while server alive messages are being sent,
1246 ssh will disconnect from the server, terminating the session.
1247 It is important to note that the use of server alive messages is very
1251 The server alive messages are sent through the encrypted channel
1252 and therefore will not be spoofable.
1253 The TCP keepalive option enabled by
1256 The server alive mechanism is valuable when the client or
1257 server depend on knowing when a connection has become inactive.
1259 The default value is 3.
1261 .Cm ServerAliveInterval
1262 (see below) is set to 15 and
1263 .Cm ServerAliveCountMax
1264 is left at the default, if the server becomes unresponsive,
1265 ssh will disconnect after approximately 45 seconds.
1266 This option applies to protocol version 2 only.
1267 .It Cm ServerAliveInterval
1268 Sets a timeout interval in seconds after which if no data has been received
1271 will send a message through the encrypted
1272 channel to request a response from the server.
1274 is 0, indicating that these messages will not be sent to the server.
1275 This option applies to protocol version 2 only.
1276 .It Cm StrictHostKeyChecking
1277 If this flag is set to
1280 will never automatically add host keys to the
1281 .Pa ~/.ssh/known_hosts
1282 file, and refuses to connect to hosts whose host key has changed.
1283 This provides maximum protection against trojan horse attacks,
1284 though it can be annoying when the
1285 .Pa /etc/ssh/ssh_known_hosts
1286 file is poorly maintained or when connections to new hosts are
1288 This option forces the user to manually
1290 If this flag is set to
1292 ssh will automatically add new host keys to the
1293 user known hosts files.
1294 If this flag is set to
1297 will be added to the user known host files only after the user
1298 has confirmed that is what they really want to do, and
1299 ssh will refuse to connect to hosts whose host key has changed.
1301 known hosts will be verified automatically in all cases.
1302 The argument must be
1310 Specifies whether the system should send TCP keepalive messages to the
1312 If they are sent, death of the connection or crash of one
1313 of the machines will be properly noticed.
1314 However, this means that
1315 connections will die if the route is down temporarily, and some people
1320 (to send TCP keepalive messages), and the client will notice
1321 if the network goes down or the remote host dies.
1322 This is important in scripts, and many users want it too.
1324 To disable TCP keepalive messages, the value should be set to
1329 device forwarding between the client and the server.
1330 The argument must be
1340 requests the default tunnel mode, which is
1341 .Dq point-to-point .
1347 devices to open on the client
1352 The argument must be
1354 .Ar local_tun Op : Ar remote_tun .
1356 The devices may be specified by numerical ID or the keyword
1358 which uses the next available tunnel device.
1361 is not specified, it defaults to
1365 .It Cm UsePrivilegedPort
1366 Specifies whether to use a privileged port for outgoing connections.
1367 The argument must be
1376 must be setuid root.
1377 Note that this option must be set to
1380 .Cm RhostsRSAAuthentication
1383 Specifies the user to log in as.
1384 This can be useful when a different user name is used on different machines.
1385 This saves the trouble of
1386 having to remember to give the user name on the command line.
1387 .It Cm UserKnownHostsFile
1388 Specifies one or more files to use for the user
1389 host key database, separated by whitespace.
1391 .Pa ~/.ssh/known_hosts ,
1392 .Pa ~/.ssh/known_hosts2 .
1393 .It Cm VerifyHostKeyDNS
1394 Specifies whether to verify the remote key using DNS and SSHFP resource
1396 If this option is set to
1398 the client will implicitly trust keys that match a secure fingerprint
1400 Insecure fingerprints will be handled as if this option was set to
1402 If this option is set to
1404 information on fingerprint match will be displayed, but the user will still
1405 need to confirm new host keys according to the
1406 .Cm StrictHostKeyChecking
1408 The argument must be
1415 if compiled with LDNS and
1418 Note that this option applies to protocol version 2 only.
1420 See also VERIFYING HOST KEYS in
1422 .It Cm VersionAddendum
1423 Specifies a string to append to the regular version string to identify
1424 OS- or site-specific modifications.
1426 .Dq FreeBSD-20140420 .
1427 .It Cm VisualHostKey
1428 If this flag is set to
1430 an ASCII art representation of the remote host key fingerprint is
1431 printed in addition to the hex fingerprint string at login and
1432 for unknown host keys.
1433 If this flag is set to
1435 no fingerprint strings are printed at login and
1436 only the hex fingerprint string will be printed for unknown host keys.
1439 .It Cm XAuthLocation
1440 Specifies the full pathname of the
1444 .Pa /usr/local/bin/xauth .
1449 consists of zero or more non-whitespace characters,
1451 (a wildcard that matches zero or more characters),
1454 (a wildcard that matches exactly one character).
1455 For example, to specify a set of declarations for any host in the
1458 the following pattern could be used:
1462 The following pattern
1463 would match any host in the 192.168.0.[0-9] network range:
1465 .Dl Host 192.168.0.?
1469 is a comma-separated list of patterns.
1470 Patterns within pattern-lists may be negated
1471 by preceding them with an exclamation mark
1474 to allow a key to be used from anywhere within an organization
1478 the following entry (in authorized_keys) could be used:
1480 .Dl from=\&"!*.dialup.example.com,*.example.com\&"
1483 .It Pa ~/.ssh/config
1484 This is the per-user configuration file.
1485 The format of this file is described above.
1486 This file is used by the SSH client.
1487 Because of the potential for abuse, this file must have strict permissions:
1488 read/write for the user, and not accessible by others.
1489 .It Pa /etc/ssh/ssh_config
1490 Systemwide configuration file.
1491 This file provides defaults for those
1492 values that are not specified in the user's configuration file, and
1493 for those users who do not have a configuration file.
1494 This file must be world-readable.
1499 OpenSSH is a derivative of the original and free
1500 ssh 1.2.12 release by Tatu Ylonen.
1501 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1502 Theo de Raadt and Dug Song
1503 removed many bugs, re-added newer features and
1505 Markus Friedl contributed the support for SSH
1506 protocol versions 1.5 and 2.0.