]> andersk Git - gssapi-openssh.git/blame - openssh/ssh_config.5
http://www.sxw.org.uk/computing/patches/openssh-5.2p1-gsskex-all-20090726.patch commi...
[gssapi-openssh.git] / openssh / ssh_config.5
CommitLineData
f5799ae1 1.\" -*- nroff -*-
2.\"
3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5.\" All rights reserved
6.\"
7.\" As far as I am concerned, the code I have written for this software
8.\" can be used freely for any purpose. Any derived versions of this
9.\" software must be clearly marked as such, and if the derived work is
10.\" incompatible with the protocol description in the RFC file, it must be
11.\" called by a name other than "ssh" or "Secure Shell".
12.\"
13.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
16.\"
17.\" Redistribution and use in source and binary forms, with or without
18.\" modification, are permitted provided that the following conditions
19.\" are met:
20.\" 1. Redistributions of source code must retain the above copyright
21.\" notice, this list of conditions and the following disclaimer.
22.\" 2. Redistributions in binary form must reproduce the above copyright
23.\" notice, this list of conditions and the following disclaimer in the
24.\" documentation and/or other materials provided with the distribution.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\"
91d9cdd3 37.\" $OpenBSD: ssh_config.5,v 1.119 2009/02/22 23:50:57 djm Exp $
38.Dd $Mdocdate: February 22 2009 $
f5799ae1 39.Dt SSH_CONFIG 5
40.Os
41.Sh NAME
42.Nm ssh_config
43.Nd OpenSSH SSH client configuration files
44.Sh SYNOPSIS
799ae497 45.Nm ~/.ssh/config
46.Nm /etc/ssh/ssh_config
f5799ae1 47.Sh DESCRIPTION
9108f8d9 48.Xr ssh 1
f5799ae1 49obtains configuration data from the following sources in
50the following order:
9108f8d9 51.Pp
41b2f314 52.Bl -enum -offset indent -compact
53.It
54command-line options
55.It
56user's configuration file
665a873d 57.Pq Pa ~/.ssh/config
41b2f314 58.It
59system-wide configuration file
60.Pq Pa /etc/ssh/ssh_config
61.El
f5799ae1 62.Pp
63For each parameter, the first obtained value
64will be used.
996d5e62 65The configuration files contain sections separated by
f5799ae1 66.Dq Host
67specifications, and that section is only applied for hosts that
68match one of the patterns given in the specification.
69The matched host name is the one given on the command line.
70.Pp
71Since the first obtained value for each parameter is used, more
72host-specific declarations should be given near the beginning of the
73file, and general defaults at the end.
74.Pp
75The configuration file has the following format:
76.Pp
77Empty lines and lines starting with
78.Ql #
79are comments.
f5799ae1 80Otherwise a line is of the format
81.Dq keyword arguments .
82Configuration options may be separated by whitespace or
83optional whitespace and exactly one
84.Ql = ;
85the latter format is useful to avoid the need to quote whitespace
86when specifying configuration options using the
87.Nm ssh ,
9108f8d9 88.Nm scp ,
f5799ae1 89and
90.Nm sftp
91.Fl o
92option.
9108f8d9 93Arguments may optionally be enclosed in double quotes
94.Pq \&"
95in order to represent arguments containing spaces.
f5799ae1 96.Pp
97The possible
98keywords and their meanings are as follows (note that
99keywords are case-insensitive and arguments are case-sensitive):
100.Bl -tag -width Ds
101.It Cm Host
102Restricts the following declarations (up to the next
103.Cm Host
104keyword) to be only for those hosts that match one of the patterns
105given after the keyword.
91d9cdd3 106If more than one pattern is provided, they should be separated by whitespace.
f5799ae1 107A single
9108f8d9 108.Ql *
f5799ae1 109as a pattern can be used to provide global
110defaults for all hosts.
111The host is the
112.Ar hostname
9108f8d9 113argument given on the command line (i.e. the name is not converted to
f5799ae1 114a canonicalized host name before matching).
9108f8d9 115.Pp
116See
117.Sx PATTERNS
118for more information on patterns.
0fff78ff 119.It Cm AddressFamily
120Specifies which address family to use when connecting.
121Valid arguments are
122.Dq any ,
123.Dq inet
9108f8d9 124(use IPv4 only), or
0fff78ff 125.Dq inet6
996d5e62 126(use IPv6 only).
f5799ae1 127.It Cm BatchMode
128If set to
129.Dq yes ,
130passphrase/password querying will be disabled.
131This option is useful in scripts and other batch jobs where no user
132is present to supply the password.
133The argument must be
134.Dq yes
135or
136.Dq no .
137The default is
138.Dq no .
139.It Cm BindAddress
665a873d 140Use the specified address on the local machine as the source address of
141the connection.
142Only useful on systems with more than one address.
f5799ae1 143Note that this option does not work if
144.Cm UsePrivilegedPort
145is set to
146.Dq yes .
147.It Cm ChallengeResponseAuthentication
9108f8d9 148Specifies whether to use challenge-response authentication.
f5799ae1 149The argument to this keyword must be
150.Dq yes
151or
152.Dq no .
153The default is
154.Dq yes .
155.It Cm CheckHostIP
156If this flag is set to
157.Dq yes ,
9108f8d9 158.Xr ssh 1
159will additionally check the host IP address in the
f5799ae1 160.Pa known_hosts
161file.
162This allows ssh to detect if a host key changed due to DNS spoofing.
163If the option is set to
164.Dq no ,
165the check will not be executed.
166The default is
167.Dq yes .
168.It Cm Cipher
169Specifies the cipher to use for encrypting the session
170in protocol version 1.
171Currently,
172.Dq blowfish ,
173.Dq 3des ,
174and
175.Dq des
176are supported.
177.Ar des
178is only supported in the
9108f8d9 179.Xr ssh 1
f5799ae1 180client for interoperability with legacy protocol 1 implementations
181that do not support the
182.Ar 3des
6a9b3198 183cipher.
184Its use is strongly discouraged due to cryptographic weaknesses.
f5799ae1 185The default is
186.Dq 3des .
187.It Cm Ciphers
188Specifies the ciphers allowed for protocol version 2
189in order of preference.
190Multiple ciphers must be comma-separated.
c9f39d2c 191The supported ciphers are
192.Dq 3des-cbc ,
193.Dq aes128-cbc ,
194.Dq aes192-cbc ,
195.Dq aes256-cbc ,
196.Dq aes128-ctr ,
197.Dq aes192-ctr ,
198.Dq aes256-ctr ,
665a873d 199.Dq arcfour128 ,
200.Dq arcfour256 ,
c9f39d2c 201.Dq arcfour ,
202.Dq blowfish-cbc ,
203and
204.Dq cast128-cbc .
9108f8d9 205The default is:
206.Bd -literal -offset 3n
91d9cdd3 207aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
208aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
209aes256-cbc,arcfour
f5799ae1 210.Ed
211.It Cm ClearAllForwardings
9108f8d9 212Specifies that all local, remote, and dynamic port forwardings
f5799ae1 213specified in the configuration files or on the command line be
6a9b3198 214cleared.
215This option is primarily useful when used from the
9108f8d9 216.Xr ssh 1
f5799ae1 217command line to clear port forwardings set in
218configuration files, and is automatically set by
219.Xr scp 1
220and
221.Xr sftp 1 .
222The argument must be
223.Dq yes
224or
225.Dq no .
226The default is
227.Dq no .
228.It Cm Compression
229Specifies whether to use compression.
230The argument must be
231.Dq yes
232or
233.Dq no .
234The default is
235.Dq no .
236.It Cm CompressionLevel
237Specifies the compression level to use if compression is enabled.
238The argument must be an integer from 1 (fast) to 9 (slow, best).
239The default level is 6, which is good for most applications.
240The meaning of the values is the same as in
241.Xr gzip 1 .
242Note that this option applies to protocol version 1 only.
243.It Cm ConnectionAttempts
244Specifies the number of tries (one per second) to make before exiting.
245The argument must be an integer.
246This may be useful in scripts if the connection sometimes fails.
247The default is 1.
0fff78ff 248.It Cm ConnectTimeout
9108f8d9 249Specifies the timeout (in seconds) used when connecting to the
250SSH server, instead of using the default system TCP timeout.
0fff78ff 251This value is used only when the target is down or really unreachable,
252not when it refuses the connection.
c9f39d2c 253.It Cm ControlMaster
254Enables the sharing of multiple sessions over a single network connection.
255When set to
9108f8d9 256.Dq yes ,
257.Xr ssh 1
c9f39d2c 258will listen for connections on a control socket specified using the
259.Cm ControlPath
260argument.
261Additional sessions can connect to this socket using the same
262.Cm ControlPath
263with
264.Cm ControlMaster
265set to
266.Dq no
267(the default).
2c06c99b 268These sessions will try to reuse the master instance's network connection
269rather than initiating new ones, but will fall back to connecting normally
270if the control socket does not exist, or is not listening.
271.Pp
c9f39d2c 272Setting this to
273.Dq ask
9108f8d9 274will cause ssh
c9f39d2c 275to listen for control connections, but require confirmation using the
276.Ev SSH_ASKPASS
277program before they are accepted (see
278.Xr ssh-add 1
279for details).
665a873d 280If the
281.Cm ControlPath
9108f8d9 282cannot be opened,
283ssh will continue without connecting to a master instance.
665a873d 284.Pp
285X11 and
286.Xr ssh-agent 1
287forwarding is supported over these multiplexed connections, however the
2c06c99b 288display and agent forwarded will be the one belonging to the master
665a873d 289connection i.e. it is not possible to forward multiple displays or agents.
290.Pp
291Two additional options allow for opportunistic multiplexing: try to use a
292master connection but fall back to creating a new one if one does not already
293exist.
294These options are:
295.Dq auto
296and
297.Dq autoask .
298The latter requires confirmation like the
299.Dq ask
300option.
c9f39d2c 301.It Cm ControlPath
665a873d 302Specify the path to the control socket used for connection sharing as described
303in the
c9f39d2c 304.Cm ControlMaster
665a873d 305section above or the string
306.Dq none
307to disable connection sharing.
308In the path,
9108f8d9 309.Ql %l
310will be substituted by the local host name,
665a873d 311.Ql %h
312will be substituted by the target host name,
313.Ql %p
9108f8d9 314the port, and
665a873d 315.Ql %r
316by the remote login username.
317It is recommended that any
318.Cm ControlPath
319used for opportunistic connection sharing include
9108f8d9 320at least %h, %p, and %r.
665a873d 321This ensures that shared connections are uniquely identified.
f5799ae1 322.It Cm DynamicForward
2c06c99b 323Specifies that a TCP port on the local machine be forwarded
f5799ae1 324over the secure channel, and the application
325protocol is then used to determine where to connect to from the
6a9b3198 326remote machine.
2c06c99b 327.Pp
328The argument must be
329.Sm off
330.Oo Ar bind_address : Oc Ar port .
331.Sm on
332IPv6 addresses can be specified by enclosing addresses in square brackets or
333by using an alternative syntax:
334.Oo Ar bind_address Ns / Oc Ns Ar port .
335By default, the local port is bound in accordance with the
336.Cm GatewayPorts
337setting.
338However, an explicit
339.Ar bind_address
340may be used to bind the connection to a specific address.
341The
342.Ar bind_address
343of
344.Dq localhost
345indicates that the listening port be bound for local use only, while an
346empty address or
347.Sq *
348indicates that the port should be available from all interfaces.
349.Pp
0fff78ff 350Currently the SOCKS4 and SOCKS5 protocols are supported, and
9108f8d9 351.Xr ssh 1
0fff78ff 352will act as a SOCKS server.
f5799ae1 353Multiple forwardings may be specified, and
6a9b3198 354additional forwardings can be given on the command line.
355Only the superuser can forward privileged ports.
0fff78ff 356.It Cm EnableSSHKeysign
357Setting this option to
358.Dq yes
359in the global client configuration file
360.Pa /etc/ssh/ssh_config
361enables the use of the helper program
362.Xr ssh-keysign 8
363during
364.Cm HostbasedAuthentication .
365The argument must be
366.Dq yes
367or
368.Dq no .
369The default is
370.Dq no .
cdd66111 371This option should be placed in the non-hostspecific section.
0fff78ff 372See
373.Xr ssh-keysign 8
374for more information.
f5799ae1 375.It Cm EscapeChar
376Sets the escape character (default:
377.Ql ~ ) .
378The escape character can also
379be set on the command line.
380The argument should be a single character,
381.Ql ^
382followed by a letter, or
383.Dq none
384to disable the escape
385character entirely (making the connection transparent for binary
386data).
9108f8d9 387.It Cm ExitOnForwardFailure
388Specifies whether
389.Xr ssh 1
390should terminate the connection if it cannot set up all requested
d4487008 391dynamic, tunnel, local, and remote port forwardings.
9108f8d9 392The argument must be
393.Dq yes
394or
395.Dq no .
396The default is
397.Dq no .
f5799ae1 398.It Cm ForwardAgent
399Specifies whether the connection to the authentication agent (if any)
400will be forwarded to the remote machine.
401The argument must be
402.Dq yes
403or
404.Dq no .
405The default is
406.Dq no .
41b2f314 407.Pp
6a9b3198 408Agent forwarding should be enabled with caution.
409Users with the ability to bypass file permissions on the remote host
410(for the agent's Unix-domain socket)
411can access the local agent through the forwarded connection.
412An attacker cannot obtain key material from the agent,
41b2f314 413however they can perform operations on the keys that enable them to
414authenticate using the identities loaded into the agent.
f5799ae1 415.It Cm ForwardX11
416Specifies whether X11 connections will be automatically redirected
417over the secure channel and
418.Ev DISPLAY
419set.
420The argument must be
421.Dq yes
422or
423.Dq no .
424The default is
425.Dq no .
41b2f314 426.Pp
6a9b3198 427X11 forwarding should be enabled with caution.
428Users with the ability to bypass file permissions on the remote host
cdd66111 429(for the user's X11 authorization database)
6a9b3198 430can access the local X11 display through the forwarded connection.
cdd66111 431An attacker may then be able to perform activities such as keystroke monitoring
432if the
433.Cm ForwardX11Trusted
434option is also enabled.
435.It Cm ForwardX11Trusted
c9f39d2c 436If this option is set to
9108f8d9 437.Dq yes ,
438remote X11 clients will have full access to the original X11 display.
996d5e62 439.Pp
cdd66111 440If this option is set to
9108f8d9 441.Dq no ,
442remote X11 clients will be considered untrusted and prevented
cdd66111 443from stealing or tampering with data belonging to trusted X11
444clients.
996d5e62 445Furthermore, the
446.Xr xauth 1
447token used for the session will be set to expire after 20 minutes.
448Remote clients will be refused access after this time.
cdd66111 449.Pp
450The default is
451.Dq no .
452.Pp
453See the X11 SECURITY extension specification for full details on
454the restrictions imposed on untrusted clients.
f5799ae1 455.It Cm GatewayPorts
456Specifies whether remote hosts are allowed to connect to local
457forwarded ports.
458By default,
9108f8d9 459.Xr ssh 1
6a9b3198 460binds local port forwardings to the loopback address.
461This prevents other remote hosts from connecting to forwarded ports.
f5799ae1 462.Cm GatewayPorts
9108f8d9 463can be used to specify that ssh
f5799ae1 464should bind local port forwardings to the wildcard address,
465thus allowing remote hosts to connect to forwarded ports.
466The argument must be
467.Dq yes
468or
469.Dq no .
470The default is
471.Dq no .
472.It Cm GlobalKnownHostsFile
473Specifies a file to use for the global
474host key database instead of
475.Pa /etc/ssh/ssh_known_hosts .
0fff78ff 476.It Cm GSSAPIAuthentication
cdd66111 477Specifies whether user authentication based on GSSAPI is allowed.
0fff78ff 478The default is
cdd66111 479.Dq no .
0fff78ff 480Note that this option applies to protocol version 2 only.
f97edba6 481.It Cm GSSAPIKeyExchange
482Specifies whether key exchange based on GSSAPI may be used. When using
483GSSAPI key exchange the server need not have a host key.
484The default is
485.Dq no .
486Note that this option applies to protocol version 2 only.
487.It Cm GSSAPIClientIdentity
488If set, specifies the GSSAPI client identity that ssh should use when
489connecting to the server. The default is unset, which means that the default
490identity will be used.
0fff78ff 491.It Cm GSSAPIDelegateCredentials
492Forward (delegate) credentials to the server.
493The default is
494.Dq no .
f97edba6 495Note that this option applies to protocol version 2 connections using GSSAPI.
496.It Cm GSSAPIRenewalForcesRekey
497If set to
498.Dq yes
499then renewal of the client's GSSAPI credentials will force the rekeying of the
500ssh connection. With a compatible server, this can delegate the renewed
501credentials to a session on the server.
502The default is
503.Dq no .
504.It Cm GSSAPITrustDns
505Set to
506.Dq yes to indicate that the DNS is trusted to securely canonicalize
507the name of the host being connected to. If
508.Dq no, the hostname entered on the
509command line will be passed untouched to the GSSAPI library.
510The default is
511.Dq no .
512This option only applies to protocol version 2 connections using GSSAPI.
996d5e62 513.It Cm HashKnownHosts
514Indicates that
9108f8d9 515.Xr ssh 1
996d5e62 516should hash host names and addresses when they are added to
665a873d 517.Pa ~/.ssh/known_hosts .
996d5e62 518These hashed names may be used normally by
9108f8d9 519.Xr ssh 1
996d5e62 520and
9108f8d9 521.Xr sshd 8 ,
996d5e62 522but they do not reveal identifying information should the file's contents
523be disclosed.
524The default is
525.Dq no .
9108f8d9 526Note that existing names and addresses in known hosts files
527will not be converted automatically,
528but may be manually hashed using
996d5e62 529.Xr ssh-keygen 1 .
f5799ae1 530.It Cm HostbasedAuthentication
531Specifies whether to try rhosts based authentication with public key
532authentication.
533The argument must be
534.Dq yes
535or
536.Dq no .
537The default is
538.Dq no .
539This option applies to protocol version 2 only and
540is similar to
541.Cm RhostsRSAAuthentication .
542.It Cm HostKeyAlgorithms
543Specifies the protocol version 2 host key algorithms
544that the client wants to use in order of preference.
545The default for this option is:
546.Dq ssh-rsa,ssh-dss .
547.It Cm HostKeyAlias
548Specifies an alias that should be used instead of the
549real host name when looking up or saving the host key
550in the host key database files.
9108f8d9 551This option is useful for tunneling SSH connections
f5799ae1 552or for multiple servers running on a single host.
553.It Cm HostName
554Specifies the real host name to log into.
555This can be used to specify nicknames or abbreviations for hosts.
9108f8d9 556The default is the name given on the command line.
f5799ae1 557Numeric IP addresses are also permitted (both on the command line and in
558.Cm HostName
559specifications).
99be0775 560.It Cm IdentitiesOnly
561Specifies that
9108f8d9 562.Xr ssh 1
99be0775 563should only use the authentication identity files configured in the
c9f39d2c 564.Nm
99be0775 565files,
9108f8d9 566even if
567.Xr ssh-agent 1
99be0775 568offers more identities.
569The argument to this keyword must be
570.Dq yes
571or
572.Dq no .
9108f8d9 573This option is intended for situations where ssh-agent
99be0775 574offers many different identities.
575The default is
576.Dq no .
2c06c99b 577.It Cm IdentityFile
578Specifies a file from which the user's RSA or DSA authentication identity
579is read.
580The default is
581.Pa ~/.ssh/identity
582for protocol version 1, and
583.Pa ~/.ssh/id_rsa
584and
585.Pa ~/.ssh/id_dsa
586for protocol version 2.
587Additionally, any identities represented by the authentication agent
588will be used for authentication.
9108f8d9 589.Pp
2c06c99b 590The file name may use the tilde
9108f8d9 591syntax to refer to a user's home directory or one of the following
592escape characters:
593.Ql %d
594(local user's home directory),
595.Ql %u
596(local user name),
597.Ql %l
598(local host name),
599.Ql %h
600(remote host name) or
601.Ql %r
602(remote user name).
603.Pp
2c06c99b 604It is possible to have
605multiple identity files specified in configuration files; all these
606identities will be tried in sequence.
47686178 607.It Cm KbdInteractiveAuthentication
608Specifies whether to use keyboard-interactive authentication.
609The argument to this keyword must be
610.Dq yes
611or
612.Dq no .
613The default is
614.Dq yes .
996d5e62 615.It Cm KbdInteractiveDevices
616Specifies the list of methods to use in keyboard-interactive authentication.
617Multiple method names must be comma-separated.
618The default is to use the server specified list.
9108f8d9 619The methods available vary depending on what the server supports.
620For an OpenSSH server,
621it may be zero or more of:
622.Dq bsdauth ,
623.Dq pam ,
624and
625.Dq skey .
2c06c99b 626.It Cm LocalCommand
627Specifies a command to execute on the local machine after successfully
628connecting to the server.
629The command string extends to the end of the line, and is executed with
47686178 630the user's shell.
22616013 631The following escape character substitutions will be performed:
632.Ql %d
633(local user's home directory),
634.Ql %h
635(remote host name),
636.Ql %l
637(local host name),
638.Ql %n
639(host name as provided on the command line),
640.Ql %p
641(remote port),
642.Ql %r
643(remote user name) or
644.Ql %u
645(local user name).
2c06c99b 646This directive is ignored unless
647.Cm PermitLocalCommand
648has been enabled.
f5799ae1 649.It Cm LocalForward
2c06c99b 650Specifies that a TCP port on the local machine be forwarded over
f5799ae1 651the secure channel to the specified host and port from the remote machine.
dec6d9fe 652The first argument must be
996d5e62 653.Sm off
dec6d9fe 654.Oo Ar bind_address : Oc Ar port
996d5e62 655.Sm on
dec6d9fe 656and the second argument must be
657.Ar host : Ns Ar hostport .
996d5e62 658IPv6 addresses can be specified by enclosing addresses in square brackets or
659by using an alternative syntax:
dec6d9fe 660.Oo Ar bind_address Ns / Oc Ns Ar port
661and
662.Ar host Ns / Ns Ar hostport .
996d5e62 663Multiple forwardings may be specified, and additional forwardings can be
664given on the command line.
f5799ae1 665Only the superuser can forward privileged ports.
996d5e62 666By default, the local port is bound in accordance with the
667.Cm GatewayPorts
668setting.
669However, an explicit
670.Ar bind_address
671may be used to bind the connection to a specific address.
672The
673.Ar bind_address
674of
675.Dq localhost
676indicates that the listening port be bound for local use only, while an
677empty address or
678.Sq *
679indicates that the port should be available from all interfaces.
f5799ae1 680.It Cm LogLevel
681Gives the verbosity level that is used when logging messages from
9108f8d9 682.Xr ssh 1 .
f5799ae1 683The possible values are:
9108f8d9 684QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
6a9b3198 685The default is INFO.
686DEBUG and DEBUG1 are equivalent.
687DEBUG2 and DEBUG3 each specify higher levels of verbose output.
f5799ae1 688.It Cm MACs
689Specifies the MAC (message authentication code) algorithms
690in order of preference.
691The MAC algorithm is used in protocol version 2
692for data integrity protection.
693Multiple algorithms must be comma-separated.
9108f8d9 694The default is:
d4487008 695.Bd -literal -offset indent
696hmac-md5,hmac-sha1,umac-64@openssh.com,
697hmac-ripemd160,hmac-sha1-96,hmac-md5-96
698.Ed
f5799ae1 699.It Cm NoHostAuthenticationForLocalhost
700This option can be used if the home directory is shared across machines.
701In this case localhost will refer to a different machine on each of
702the machines and the user will get many warnings about changed host keys.
703However, this option disables host authentication for localhost.
704The argument to this keyword must be
705.Dq yes
706or
707.Dq no .
708The default is to check the host key for localhost.
709.It Cm NumberOfPasswordPrompts
710Specifies the number of password prompts before giving up.
711The argument to this keyword must be an integer.
9108f8d9 712The default is 3.
f5799ae1 713.It Cm PasswordAuthentication
714Specifies whether to use password authentication.
715The argument to this keyword must be
716.Dq yes
717or
718.Dq no .
719The default is
720.Dq yes .
2c06c99b 721.It Cm PermitLocalCommand
722Allow local command execution via the
723.Ic LocalCommand
724option or using the
725.Ic !\& Ns Ar command
726escape sequence in
727.Xr ssh 1 .
728The argument must be
729.Dq yes
730or
731.Dq no .
732The default is
733.Dq no .
f5799ae1 734.It Cm Port
735Specifies the port number to connect on the remote host.
9108f8d9 736The default is 22.
f5799ae1 737.It Cm PreferredAuthentications
738Specifies the order in which the client should try protocol 2
0fff78ff 739authentication methods.
dec6d9fe 740This allows a client to prefer one method (e.g.\&
f5799ae1 741.Cm keyboard-interactive )
dec6d9fe 742over another method (e.g.\&
f5799ae1 743.Cm password )
744The default for this option is:
9108f8d9 745.Do gssapi-with-mic ,
746hostbased,
747publickey,
748keyboard-interactive,
749password
750.Dc .
f5799ae1 751.It Cm Protocol
752Specifies the protocol versions
9108f8d9 753.Xr ssh 1
f5799ae1 754should support in order of preference.
755The possible values are
9108f8d9 756.Sq 1
f5799ae1 757and
9108f8d9 758.Sq 2 .
f5799ae1 759Multiple versions must be comma-separated.
760The default is
761.Dq 2,1 .
9108f8d9 762This means that ssh
f5799ae1 763tries version 2 and falls back to version 1
764if version 2 is not available.
765.It Cm ProxyCommand
766Specifies the command to use to connect to the server.
767The command
768string extends to the end of the line, and is executed with
47686178 769the user's shell.
f5799ae1 770In the command string,
771.Ql %h
772will be substituted by the host name to
773connect and
774.Ql %p
775by the port.
776The command can be basically anything,
777and should read from its standard input and write to its standard output.
778It should eventually connect an
779.Xr sshd 8
780server running on some machine, or execute
781.Ic sshd -i
782somewhere.
783Host key management will be done using the
784HostName of the host being connected (defaulting to the name typed by
785the user).
6a9b3198 786Setting the command to
787.Dq none
788disables this option entirely.
f5799ae1 789Note that
790.Cm CheckHostIP
791is not available for connects with a proxy command.
792.Pp
665a873d 793This directive is useful in conjunction with
794.Xr nc 1
795and its proxy support.
796For example, the following directive would connect via an HTTP proxy at
797192.0.2.0:
798.Bd -literal -offset 3n
799ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
800.Ed
f5799ae1 801.It Cm PubkeyAuthentication
802Specifies whether to try public key authentication.
803The argument to this keyword must be
804.Dq yes
805or
806.Dq no .
807The default is
808.Dq yes .
809This option applies to protocol version 2 only.
2c06c99b 810.It Cm RekeyLimit
811Specifies the maximum amount of data that may be transmitted before the
812session key is renegotiated.
813The argument is the number of bytes, with an optional suffix of
814.Sq K ,
815.Sq M ,
816or
817.Sq G
818to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
819The default is between
9108f8d9 820.Sq 1G
2c06c99b 821and
9108f8d9 822.Sq 4G ,
2c06c99b 823depending on the cipher.
824This option applies to protocol version 2 only.
f5799ae1 825.It Cm RemoteForward
2c06c99b 826Specifies that a TCP port on the remote machine be forwarded over
f5799ae1 827the secure channel to the specified host and port from the local machine.
dec6d9fe 828The first argument must be
996d5e62 829.Sm off
dec6d9fe 830.Oo Ar bind_address : Oc Ar port
996d5e62 831.Sm on
dec6d9fe 832and the second argument must be
833.Ar host : Ns Ar hostport .
834IPv6 addresses can be specified by enclosing addresses in square brackets
835or by using an alternative syntax:
836.Oo Ar bind_address Ns / Oc Ns Ar port
837and
838.Ar host Ns / Ns Ar hostport .
f5799ae1 839Multiple forwardings may be specified, and additional
840forwardings can be given on the command line.
91d9cdd3 841Privileged ports can be forwarded only when
842logging in as root on the remote machine.
843.Pp
844If the
845.Ar port
846argument is
847.Ql 0 ,
848the listen port will be dynamically allocated on the server and reported
849to the client at run time.
996d5e62 850.Pp
851If the
852.Ar bind_address
853is not specified, the default is to only bind to loopback addresses.
854If the
855.Ar bind_address
856is
857.Ql *
858or an empty string, then the forwarding is requested to listen on all
859interfaces.
860Specifying a remote
861.Ar bind_address
862will only succeed if the server's
863.Cm GatewayPorts
864option is enabled (see
865.Xr sshd_config 5 ) .
f5799ae1 866.It Cm RhostsRSAAuthentication
867Specifies whether to try rhosts based authentication with RSA host
868authentication.
869The argument must be
870.Dq yes
871or
872.Dq no .
873The default is
874.Dq no .
875This option applies to protocol version 1 only and requires
9108f8d9 876.Xr ssh 1
f5799ae1 877to be setuid root.
878.It Cm RSAAuthentication
879Specifies whether to try RSA authentication.
880The argument to this keyword must be
881.Dq yes
882or
883.Dq no .
884RSA authentication will only be
885attempted if the identity file exists, or an authentication agent is
886running.
887The default is
888.Dq yes .
889Note that this option applies to protocol version 1 only.
c9f39d2c 890.It Cm SendEnv
891Specifies what variables from the local
892.Xr environ 7
893should be sent to the server.
9108f8d9 894Note that environment passing is only supported for protocol 2.
895The server must also support it, and the server must be configured to
c9f39d2c 896accept these environment variables.
897Refer to
898.Cm AcceptEnv
899in
900.Xr sshd_config 5
901for how to configure the server.
9108f8d9 902Variables are specified by name, which may contain wildcard characters.
c9f39d2c 903Multiple environment variables may be separated by whitespace or spread
904across multiple
905.Cm SendEnv
906directives.
907The default is not to send any environment variables.
9108f8d9 908.Pp
909See
910.Sx PATTERNS
911for more information on patterns.
cdd66111 912.It Cm ServerAliveCountMax
2c06c99b 913Sets the number of server alive messages (see below) which may be
cdd66111 914sent without
9108f8d9 915.Xr ssh 1
cdd66111 916receiving any messages back from the server.
917If this threshold is reached while server alive messages are being sent,
9108f8d9 918ssh will disconnect from the server, terminating the session.
cdd66111 919It is important to note that the use of server alive messages is very
920different from
921.Cm TCPKeepAlive
922(below).
923The server alive messages are sent through the encrypted channel
924and therefore will not be spoofable.
925The TCP keepalive option enabled by
926.Cm TCPKeepAlive
927is spoofable.
928The server alive mechanism is valuable when the client or
929server depend on knowing when a connection has become inactive.
930.Pp
931The default value is 3.
932If, for example,
933.Cm ServerAliveInterval
9108f8d9 934(see below) is set to 15 and
cdd66111 935.Cm ServerAliveCountMax
9108f8d9 936is left at the default, if the server becomes unresponsive,
937ssh will disconnect after approximately 45 seconds.
938This option applies to protocol version 2 only.
2c06c99b 939.It Cm ServerAliveInterval
940Sets a timeout interval in seconds after which if no data has been received
941from the server,
9108f8d9 942.Xr ssh 1
2c06c99b 943will send a message through the encrypted
944channel to request a response from the server.
945The default
946is 0, indicating that these messages will not be sent to the server.
947This option applies to protocol version 2 only.
f5799ae1 948.It Cm SmartcardDevice
0fff78ff 949Specifies which smartcard device to use.
950The argument to this keyword is the device
9108f8d9 951.Xr ssh 1
f5799ae1 952should use to communicate with a smartcard used for storing the user's
0fff78ff 953private RSA key.
954By default, no device is specified and smartcard support is not activated.
f5799ae1 955.It Cm StrictHostKeyChecking
956If this flag is set to
957.Dq yes ,
9108f8d9 958.Xr ssh 1
f5799ae1 959will never automatically add host keys to the
665a873d 960.Pa ~/.ssh/known_hosts
f5799ae1 961file, and refuses to connect to hosts whose host key has changed.
962This provides maximum protection against trojan horse attacks,
9108f8d9 963though it can be annoying when the
f5799ae1 964.Pa /etc/ssh/ssh_known_hosts
9108f8d9 965file is poorly maintained or when connections to new hosts are
f5799ae1 966frequently made.
967This option forces the user to manually
968add all new hosts.
969If this flag is set to
970.Dq no ,
9108f8d9 971ssh will automatically add new host keys to the
f5799ae1 972user known hosts files.
973If this flag is set to
974.Dq ask ,
975new host keys
976will be added to the user known host files only after the user
977has confirmed that is what they really want to do, and
9108f8d9 978ssh will refuse to connect to hosts whose host key has changed.
f5799ae1 979The host keys of
980known hosts will be verified automatically in all cases.
981The argument must be
982.Dq yes ,
9108f8d9 983.Dq no ,
f5799ae1 984or
985.Dq ask .
986The default is
987.Dq ask .
cdd66111 988.It Cm TCPKeepAlive
989Specifies whether the system should send TCP keepalive messages to the
990other side.
991If they are sent, death of the connection or crash of one
992of the machines will be properly noticed.
993However, this means that
994connections will die if the route is down temporarily, and some people
995find it annoying.
996.Pp
997The default is
998.Dq yes
999(to send TCP keepalive messages), and the client will notice
1000if the network goes down or the remote host dies.
1001This is important in scripts, and many users want it too.
1002.Pp
1003To disable TCP keepalive messages, the value should be set to
1004.Dq no .
2c06c99b 1005.It Cm Tunnel
9108f8d9 1006Request
2c06c99b 1007.Xr tun 4
1008device forwarding between the client and the server.
2c06c99b 1009The argument must be
1010.Dq yes ,
9108f8d9 1011.Dq point-to-point
1012(layer 3),
2c06c99b 1013.Dq ethernet
9108f8d9 1014(layer 2),
2c06c99b 1015or
1016.Dq no .
9108f8d9 1017Specifying
1018.Dq yes
1019requests the default tunnel mode, which is
1020.Dq point-to-point .
2c06c99b 1021The default is
1022.Dq no .
1023.It Cm TunnelDevice
9108f8d9 1024Specifies the
2c06c99b 1025.Xr tun 4
9108f8d9 1026devices to open on the client
1027.Pq Ar local_tun
1028and the server
1029.Pq Ar remote_tun .
1030.Pp
1031The argument must be
1032.Sm off
1033.Ar local_tun Op : Ar remote_tun .
1034.Sm on
1035The devices may be specified by numerical ID or the keyword
1036.Dq any ,
1037which uses the next available tunnel device.
1038If
1039.Ar remote_tun
1040is not specified, it defaults to
1041.Dq any .
1042The default is
1043.Dq any:any .
f5799ae1 1044.It Cm UsePrivilegedPort
1045Specifies whether to use a privileged port for outgoing connections.
1046The argument must be
1047.Dq yes
1048or
1049.Dq no .
1050The default is
1051.Dq no .
41b2f314 1052If set to
9108f8d9 1053.Dq yes ,
1054.Xr ssh 1
41b2f314 1055must be setuid root.
f5799ae1 1056Note that this option must be set to
1057.Dq yes
0fff78ff 1058for
f5799ae1 1059.Cm RhostsRSAAuthentication
0fff78ff 1060with older servers.
f5799ae1 1061.It Cm User
1062Specifies the user to log in as.
1063This can be useful when a different user name is used on different machines.
1064This saves the trouble of
1065having to remember to give the user name on the command line.
1066.It Cm UserKnownHostsFile
1067Specifies a file to use for the user
1068host key database instead of
665a873d 1069.Pa ~/.ssh/known_hosts .
0fff78ff 1070.It Cm VerifyHostKeyDNS
1071Specifies whether to verify the remote key using DNS and SSHFP resource
1072records.
cdd66111 1073If this option is set to
1074.Dq yes ,
1075the client will implicitly trust keys that match a secure fingerprint
1076from DNS.
1077Insecure fingerprints will be handled as if this option was set to
1078.Dq ask .
1079If this option is set to
1080.Dq ask ,
1081information on fingerprint match will be displayed, but the user will still
1082need to confirm new host keys according to the
1083.Cm StrictHostKeyChecking
1084option.
1085The argument must be
1086.Dq yes ,
9108f8d9 1087.Dq no ,
cdd66111 1088or
1089.Dq ask .
0fff78ff 1090The default is
1091.Dq no .
1092Note that this option applies to protocol version 2 only.
9108f8d9 1093.Pp
1094See also
1095.Sx VERIFYING HOST KEYS
1096in
1097.Xr ssh 1 .
22616013 1098.It Cm VisualHostKey
1099If this flag is set to
1100.Dq yes ,
1101an ASCII art representation of the remote host key fingerprint is
91d9cdd3 1102printed in addition to the hex fingerprint string at login and
1103for unknown host keys.
22616013 1104If this flag is set to
1105.Dq no ,
91d9cdd3 1106no fingerprint strings are printed at login and
1107only the hex fingerprint string will be printed for unknown host keys.
22616013 1108The default is
1109.Dq no .
f5799ae1 1110.It Cm XAuthLocation
41b2f314 1111Specifies the full pathname of the
f5799ae1 1112.Xr xauth 1
1113program.
1114The default is
1115.Pa /usr/X11R6/bin/xauth .
1116.El
9108f8d9 1117.Sh PATTERNS
1118A
1119.Em pattern
1120consists of zero or more non-whitespace characters,
1121.Sq *
1122(a wildcard that matches zero or more characters),
1123or
1124.Sq ?\&
1125(a wildcard that matches exactly one character).
1126For example, to specify a set of declarations for any host in the
1127.Dq .co.uk
1128set of domains,
1129the following pattern could be used:
1130.Pp
1131.Dl Host *.co.uk
1132.Pp
1133The following pattern
1134would match any host in the 192.168.0.[0-9] network range:
1135.Pp
1136.Dl Host 192.168.0.?
1137.Pp
1138A
1139.Em pattern-list
1140is a comma-separated list of patterns.
1141Patterns within pattern-lists may be negated
1142by preceding them with an exclamation mark
1143.Pq Sq !\& .
1144For example,
1145to allow a key to be used from anywhere within an organisation
1146except from the
1147.Dq dialup
1148pool,
1149the following entry (in authorized_keys) could be used:
1150.Pp
1151.Dl from=\&"!*.dialup.example.com,*.example.com\&"
f5799ae1 1152.Sh FILES
1153.Bl -tag -width Ds
665a873d 1154.It Pa ~/.ssh/config
f5799ae1 1155This is the per-user configuration file.
1156The format of this file is described above.
9108f8d9 1157This file is used by the SSH client.
c9f39d2c 1158Because of the potential for abuse, this file must have strict permissions:
1159read/write for the user, and not accessible by others.
f5799ae1 1160.It Pa /etc/ssh/ssh_config
1161Systemwide configuration file.
1162This file provides defaults for those
1163values that are not specified in the user's configuration file, and
1164for those users who do not have a configuration file.
1165This file must be world-readable.
1166.El
0fff78ff 1167.Sh SEE ALSO
1168.Xr ssh 1
f5799ae1 1169.Sh AUTHORS
1170OpenSSH is a derivative of the original and free
1171ssh 1.2.12 release by Tatu Ylonen.
1172Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1173Theo de Raadt and Dug Song
1174removed many bugs, re-added newer features and
1175created OpenSSH.
1176Markus Friedl contributed the support for SSH
1177protocol versions 1.5 and 2.0.
This page took 3.765585 seconds and 5 git commands to generate.