]> andersk Git - gssapi-openssh.git/blame - openssh/ssh_config.5
remove GSSAPI authentication support for SSH protocol 1
[gssapi-openssh.git] / openssh / ssh_config.5
CommitLineData
884dc78b 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.\"
7cac2b65 37.\" $OpenBSD: ssh_config.5,v 1.20 2003/09/02 18:50:06 jmc Exp $
884dc78b 38.Dd September 25, 1999
39.Dt SSH_CONFIG 5
40.Os
41.Sh NAME
42.Nm ssh_config
43.Nd OpenSSH SSH client configuration files
44.Sh SYNOPSIS
45.Bl -tag -width Ds -compact
46.It Pa $HOME/.ssh/config
47.It Pa /etc/ssh/ssh_config
48.El
49.Sh DESCRIPTION
50.Nm ssh
51obtains configuration data from the following sources in
52the following order:
d03f4262 53.Bl -enum -offset indent -compact
54.It
55command-line options
56.It
44a053a3 57user's configuration file
d03f4262 58.Pq Pa $HOME/.ssh/config
59.It
d6862c36 60GSSAPI configuration file
d03f4262 61.Pq Pa $HOME/.ssh/config.gssapi
62.It
d6862c36 63Kerberos configuration file
d03f4262 64.Pq Pa $HOME/.ssh/config.krb
65.It
d03f4262 66system-wide configuration file
67.Pq Pa /etc/ssh/ssh_config
44a053a3 68.El
884dc78b 69.Pp
70For each parameter, the first obtained value
71will be used.
72The configuration files contain sections bracketed by
73.Dq Host
74specifications, and that section is only applied for hosts that
75match one of the patterns given in the specification.
76The matched host name is the one given on the command line.
77.Pp
78Since the first obtained value for each parameter is used, more
79host-specific declarations should be given near the beginning of the
80file, and general defaults at the end.
81.Pp
82The configuration file has the following format:
83.Pp
84Empty lines and lines starting with
85.Ql #
86are comments.
87.Pp
88Otherwise a line is of the format
89.Dq keyword arguments .
90Configuration options may be separated by whitespace or
91optional whitespace and exactly one
92.Ql = ;
93the latter format is useful to avoid the need to quote whitespace
94when specifying configuration options using the
95.Nm ssh ,
96.Nm scp
97and
98.Nm sftp
99.Fl o
100option.
101.Pp
102The possible
103keywords and their meanings are as follows (note that
104keywords are case-insensitive and arguments are case-sensitive):
105.Bl -tag -width Ds
106.It Cm Host
107Restricts the following declarations (up to the next
108.Cm Host
109keyword) to be only for those hosts that match one of the patterns
110given after the keyword.
111.Ql \&*
112and
7cac2b65 113.Ql \&?
884dc78b 114can be used as wildcards in the
115patterns.
116A single
117.Ql \&*
118as a pattern can be used to provide global
119defaults for all hosts.
120The host is the
121.Ar hostname
122argument given on the command line (i.e., the name is not converted to
123a canonicalized host name before matching).
7cac2b65 124.It Cm AddressFamily
125Specifies which address family to use when connecting.
126Valid arguments are
127.Dq any ,
128.Dq inet
129(Use IPv4 only) or
130.Dq inet6
131(Use IPv6 only.)
884dc78b 132.It Cm BatchMode
133If set to
134.Dq yes ,
135passphrase/password querying will be disabled.
136This option is useful in scripts and other batch jobs where no user
137is present to supply the password.
138The argument must be
139.Dq yes
140or
141.Dq no .
142The default is
143.Dq no .
144.It Cm BindAddress
145Specify the interface to transmit from on machines with multiple
146interfaces or aliased addresses.
147Note that this option does not work if
148.Cm UsePrivilegedPort
149is set to
150.Dq yes .
151.It Cm ChallengeResponseAuthentication
152Specifies whether to use challenge response authentication.
153The argument to this keyword must be
154.Dq yes
155or
156.Dq no .
157The default is
158.Dq yes .
159.It Cm CheckHostIP
160If this flag is set to
161.Dq yes ,
162ssh will additionally check the host IP address in the
163.Pa known_hosts
164file.
165This allows ssh to detect if a host key changed due to DNS spoofing.
166If the option is set to
167.Dq no ,
168the check will not be executed.
169The default is
170.Dq yes .
171.It Cm Cipher
172Specifies the cipher to use for encrypting the session
173in protocol version 1.
174Currently,
175.Dq blowfish ,
176.Dq 3des ,
177and
178.Dq des
179are supported.
180.Ar des
181is only supported in the
182.Nm ssh
183client for interoperability with legacy protocol 1 implementations
184that do not support the
185.Ar 3des
bfe49944 186cipher.
187Its use is strongly discouraged due to cryptographic weaknesses.
884dc78b 188The default is
189.Dq 3des .
190.It Cm Ciphers
191Specifies the ciphers allowed for protocol version 2
192in order of preference.
193Multiple ciphers must be comma-separated.
194The default is
195.Pp
196.Bd -literal
197 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
198 aes192-cbc,aes256-cbc''
199.Ed
200.It Cm ClearAllForwardings
201Specifies that all local, remote and dynamic port forwardings
202specified in the configuration files or on the command line be
bfe49944 203cleared.
204This option is primarily useful when used from the
884dc78b 205.Nm ssh
206command line to clear port forwardings set in
207configuration files, and is automatically set by
208.Xr scp 1
209and
210.Xr sftp 1 .
211The argument must be
212.Dq yes
213or
214.Dq no .
215The default is
216.Dq no .
217.It Cm Compression
218Specifies whether to use compression.
219The argument must be
220.Dq yes
221or
222.Dq no .
223The default is
224.Dq no .
225.It Cm CompressionLevel
226Specifies the compression level to use if compression is enabled.
227The argument must be an integer from 1 (fast) to 9 (slow, best).
228The default level is 6, which is good for most applications.
229The meaning of the values is the same as in
230.Xr gzip 1 .
231Note that this option applies to protocol version 1 only.
232.It Cm ConnectionAttempts
233Specifies the number of tries (one per second) to make before exiting.
234The argument must be an integer.
235This may be useful in scripts if the connection sometimes fails.
236The default is 1.
7cac2b65 237.It Cm ConnectTimeout
238Specifies the timeout (in seconds) used when connecting to the ssh
239server, instead of using the default system TCP timeout.
240This value is used only when the target is down or really unreachable,
241not when it refuses the connection.
884dc78b 242.It Cm DynamicForward
243Specifies that a TCP/IP port on the local machine be forwarded
244over the secure channel, and the application
245protocol is then used to determine where to connect to from the
bfe49944 246remote machine.
247The argument must be a port number.
7cac2b65 248Currently the SOCKS4 and SOCKS5 protocols are supported, and
884dc78b 249.Nm ssh
7cac2b65 250will act as a SOCKS server.
884dc78b 251Multiple forwardings may be specified, and
bfe49944 252additional forwardings can be given on the command line.
253Only the superuser can forward privileged ports.
7cac2b65 254.It Cm EnableSSHKeysign
255Setting this option to
256.Dq yes
257in the global client configuration file
258.Pa /etc/ssh/ssh_config
259enables the use of the helper program
260.Xr ssh-keysign 8
261during
262.Cm HostbasedAuthentication .
263The argument must be
264.Dq yes
265or
266.Dq no .
267The default is
268.Dq no .
269See
270.Xr ssh-keysign 8
271for more information.
884dc78b 272.It Cm EscapeChar
273Sets the escape character (default:
274.Ql ~ ) .
275The escape character can also
276be set on the command line.
277The argument should be a single character,
278.Ql ^
279followed by a letter, or
280.Dq none
281to disable the escape
282character entirely (making the connection transparent for binary
283data).
284.It Cm ForwardAgent
285Specifies whether the connection to the authentication agent (if any)
286will be forwarded to the remote machine.
287The argument must be
288.Dq yes
289or
290.Dq no .
291The default is
292.Dq no .
d03f4262 293.Pp
bfe49944 294Agent forwarding should be enabled with caution.
295Users with the ability to bypass file permissions on the remote host
296(for the agent's Unix-domain socket)
297can access the local agent through the forwarded connection.
298An attacker cannot obtain key material from the agent,
d03f4262 299however they can perform operations on the keys that enable them to
300authenticate using the identities loaded into the agent.
884dc78b 301.It Cm ForwardX11
302Specifies whether X11 connections will be automatically redirected
303over the secure channel and
304.Ev DISPLAY
305set.
306The argument must be
307.Dq yes
308or
309.Dq no .
310The default is
311.Dq no .
d03f4262 312.Pp
bfe49944 313X11 forwarding should be enabled with caution.
314Users with the ability to bypass file permissions on the remote host
315(for the user's X authorization database)
316can access the local X11 display through the forwarded connection.
317An attacker may then be able to perform activities such as keystroke monitoring.
884dc78b 318.It Cm GatewayPorts
319Specifies whether remote hosts are allowed to connect to local
320forwarded ports.
321By default,
322.Nm ssh
bfe49944 323binds local port forwardings to the loopback address.
324This prevents other remote hosts from connecting to forwarded ports.
884dc78b 325.Cm GatewayPorts
326can be used to specify that
327.Nm ssh
328should bind local port forwardings to the wildcard address,
329thus allowing remote hosts to connect to forwarded ports.
330The argument must be
331.Dq yes
332or
333.Dq no .
334The default is
335.Dq no .
336.It Cm GlobalKnownHostsFile
337Specifies a file to use for the global
338host key database instead of
339.Pa /etc/ssh/ssh_known_hosts .
7cac2b65 340.It Cm GSSAPIAuthentication
44a053a3 341Specifies whether authentication based on GSSAPI may be used, either using
342the result of a successful key exchange, or using GSSAPI user
343authentication.
344The default is
345.Dq yes .
85740ad2 346Note that this option applies to protocol version 2 only.
7cac2b65 347.It Cm GSSAPIKeyExchange
7a056ed1 348Specifies whether key exchange based on GSSAPI may be used. When using
349GSSAPI key exchange the server need not have a host key.
350The default is
351.Dq yes .
85740ad2 352Note that this option applies to protocol version 2 only.
7cac2b65 353.It Cm GSSAPIDelegateCredentials
85740ad2 354Forward (delegate) credentials to the server.
44a053a3 355The default is
356.Dq yes .
85740ad2 357Note that this option applies to protocol version 2 only.
884dc78b 358.It Cm HostbasedAuthentication
359Specifies whether to try rhosts based authentication with public key
360authentication.
361The argument must be
362.Dq yes
363or
364.Dq no .
365The default is
366.Dq no .
367This option applies to protocol version 2 only and
368is similar to
369.Cm RhostsRSAAuthentication .
370.It Cm HostKeyAlgorithms
371Specifies the protocol version 2 host key algorithms
372that the client wants to use in order of preference.
373The default for this option is:
374.Dq ssh-rsa,ssh-dss .
375.It Cm HostKeyAlias
376Specifies an alias that should be used instead of the
377real host name when looking up or saving the host key
378in the host key database files.
379This option is useful for tunneling ssh connections
380or for multiple servers running on a single host.
381.It Cm HostName
382Specifies the real host name to log into.
383This can be used to specify nicknames or abbreviations for hosts.
384Default is the name given on the command line.
385Numeric IP addresses are also permitted (both on the command line and in
386.Cm HostName
387specifications).
388.It Cm IdentityFile
389Specifies a file from which the user's RSA or DSA authentication identity
7cac2b65 390is read.
391The default is
884dc78b 392.Pa $HOME/.ssh/identity
393for protocol version 1, and
394.Pa $HOME/.ssh/id_rsa
395and
396.Pa $HOME/.ssh/id_dsa
397for protocol version 2.
398Additionally, any identities represented by the authentication agent
399will be used for authentication.
400The file name may use the tilde
401syntax to refer to a user's home directory.
402It is possible to have
403multiple identity files specified in configuration files; all these
404identities will be tried in sequence.
405.It Cm KeepAlive
406Specifies whether the system should send TCP keepalive messages to the
407other side.
408If they are sent, death of the connection or crash of one
409of the machines will be properly noticed.
410However, this means that
411connections will die if the route is down temporarily, and some people
412find it annoying.
413.Pp
414The default is
415.Dq yes
416(to send keepalives), and the client will notice
417if the network goes down or the remote host dies.
418This is important in scripts, and many users want it too.
419.Pp
420To disable keepalives, the value should be set to
421.Dq no .
884dc78b 422.It Cm LocalForward
423Specifies that a TCP/IP port on the local machine be forwarded over
424the secure channel to the specified host and port from the remote machine.
425The first argument must be a port number, and the second must be
426.Ar host:port .
427IPv6 addresses can be specified with an alternative syntax:
428.Ar host/port .
429Multiple forwardings may be specified, and additional
430forwardings can be given on the command line.
431Only the superuser can forward privileged ports.
432.It Cm LogLevel
433Gives the verbosity level that is used when logging messages from
434.Nm ssh .
435The possible values are:
436QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.
bfe49944 437The default is INFO.
438DEBUG and DEBUG1 are equivalent.
439DEBUG2 and DEBUG3 each specify higher levels of verbose output.
884dc78b 440.It Cm MACs
441Specifies the MAC (message authentication code) algorithms
442in order of preference.
443The MAC algorithm is used in protocol version 2
444for data integrity protection.
445Multiple algorithms must be comma-separated.
446The default is
447.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
448.It Cm NoHostAuthenticationForLocalhost
449This option can be used if the home directory is shared across machines.
450In this case localhost will refer to a different machine on each of
451the machines and the user will get many warnings about changed host keys.
452However, this option disables host authentication for localhost.
453The argument to this keyword must be
454.Dq yes
455or
456.Dq no .
457The default is to check the host key for localhost.
458.It Cm NumberOfPasswordPrompts
459Specifies the number of password prompts before giving up.
460The argument to this keyword must be an integer.
461Default is 3.
462.It Cm PasswordAuthentication
463Specifies whether to use password authentication.
464The argument to this keyword must be
465.Dq yes
466or
467.Dq no .
468The default is
469.Dq yes .
470.It Cm Port
471Specifies the port number to connect on the remote host.
472Default is 22.
473.It Cm PreferredAuthentications
474Specifies the order in which the client should try protocol 2
7cac2b65 475authentication methods.
476This allows a client to prefer one method (e.g.
884dc78b 477.Cm keyboard-interactive )
478over another method (e.g.
479.Cm password )
480The default for this option is:
44a053a3 481.Dq hostbased,external-keyx,gssapi,publickey,keyboard-interactive,password .
884dc78b 482.It Cm Protocol
483Specifies the protocol versions
484.Nm ssh
485should support in order of preference.
486The possible values are
487.Dq 1
488and
489.Dq 2 .
490Multiple versions must be comma-separated.
491The default is
492.Dq 2,1 .
493This means that
494.Nm ssh
495tries version 2 and falls back to version 1
496if version 2 is not available.
497.It Cm ProxyCommand
498Specifies the command to use to connect to the server.
499The command
500string extends to the end of the line, and is executed with
501.Pa /bin/sh .
502In the command string,
503.Ql %h
504will be substituted by the host name to
505connect and
506.Ql %p
507by the port.
508The command can be basically anything,
509and should read from its standard input and write to its standard output.
510It should eventually connect an
511.Xr sshd 8
512server running on some machine, or execute
513.Ic sshd -i
514somewhere.
515Host key management will be done using the
516HostName of the host being connected (defaulting to the name typed by
517the user).
bfe49944 518Setting the command to
519.Dq none
520disables this option entirely.
884dc78b 521Note that
522.Cm CheckHostIP
523is not available for connects with a proxy command.
524.Pp
525.It Cm PubkeyAuthentication
526Specifies whether to try public key authentication.
527The argument to this keyword must be
528.Dq yes
529or
530.Dq no .
531The default is
532.Dq yes .
533This option applies to protocol version 2 only.
534.It Cm RemoteForward
535Specifies that a TCP/IP port on the remote machine be forwarded over
536the secure channel to the specified host and port from the local machine.
537The first argument must be a port number, and the second must be
538.Ar host:port .
539IPv6 addresses can be specified with an alternative syntax:
540.Ar host/port .
541Multiple forwardings may be specified, and additional
542forwardings can be given on the command line.
543Only the superuser can forward privileged ports.
884dc78b 544.It Cm RhostsRSAAuthentication
545Specifies whether to try rhosts based authentication with RSA host
546authentication.
547The argument must be
548.Dq yes
549or
550.Dq no .
551The default is
552.Dq no .
553This option applies to protocol version 1 only and requires
554.Nm ssh
555to be setuid root.
556.It Cm RSAAuthentication
557Specifies whether to try RSA authentication.
558The argument to this keyword must be
559.Dq yes
560or
561.Dq no .
562RSA authentication will only be
563attempted if the identity file exists, or an authentication agent is
564running.
565The default is
566.Dq yes .
567Note that this option applies to protocol version 1 only.
568.It Cm SmartcardDevice
7cac2b65 569Specifies which smartcard device to use.
570The argument to this keyword is the device
884dc78b 571.Nm ssh
572should use to communicate with a smartcard used for storing the user's
7cac2b65 573private RSA key.
574By default, no device is specified and smartcard support is not activated.
884dc78b 575.It Cm StrictHostKeyChecking
576If this flag is set to
577.Dq yes ,
578.Nm ssh
579will never automatically add host keys to the
580.Pa $HOME/.ssh/known_hosts
581file, and refuses to connect to hosts whose host key has changed.
582This provides maximum protection against trojan horse attacks,
583however, can be annoying when the
584.Pa /etc/ssh/ssh_known_hosts
585file is poorly maintained, or connections to new hosts are
586frequently made.
587This option forces the user to manually
588add all new hosts.
589If this flag is set to
590.Dq no ,
591.Nm ssh
592will automatically add new host keys to the
593user known hosts files.
594If this flag is set to
595.Dq ask ,
596new host keys
597will be added to the user known host files only after the user
598has confirmed that is what they really want to do, and
599.Nm ssh
600will refuse to connect to hosts whose host key has changed.
601The host keys of
602known hosts will be verified automatically in all cases.
603The argument must be
604.Dq yes ,
605.Dq no
606or
607.Dq ask .
608The default is
609.Dq ask .
610.It Cm UsePrivilegedPort
611Specifies whether to use a privileged port for outgoing connections.
612The argument must be
613.Dq yes
614or
615.Dq no .
616The default is
617.Dq no .
d03f4262 618If set to
619.Dq yes
620.Nm ssh
621must be setuid root.
884dc78b 622Note that this option must be set to
623.Dq yes
7cac2b65 624for
884dc78b 625.Cm RhostsRSAAuthentication
7cac2b65 626with older servers.
884dc78b 627.It Cm User
628Specifies the user to log in as.
629This can be useful when a different user name is used on different machines.
630This saves the trouble of
631having to remember to give the user name on the command line.
632.It Cm UserKnownHostsFile
633Specifies a file to use for the user
634host key database instead of
635.Pa $HOME/.ssh/known_hosts .
7cac2b65 636.It Cm VerifyHostKeyDNS
637Specifies whether to verify the remote key using DNS and SSHFP resource
638records.
639The default is
640.Dq no .
641Note that this option applies to protocol version 2 only.
884dc78b 642.It Cm XAuthLocation
d03f4262 643Specifies the full pathname of the
884dc78b 644.Xr xauth 1
645program.
646The default is
647.Pa /usr/X11R6/bin/xauth .
648.El
649.Sh FILES
650.Bl -tag -width Ds
651.It Pa $HOME/.ssh/config
652This is the per-user configuration file.
653The format of this file is described above.
654This file is used by the
655.Nm ssh
656client.
657This file does not usually contain any sensitive information,
658but the recommended permissions are read/write for the user, and not
659accessible by others.
660.It Pa /etc/ssh/ssh_config
661Systemwide configuration file.
662This file provides defaults for those
663values that are not specified in the user's configuration file, and
664for those users who do not have a configuration file.
665This file must be world-readable.
666.El
7cac2b65 667.Sh SEE ALSO
668.Xr ssh 1
884dc78b 669.Sh AUTHORS
670OpenSSH is a derivative of the original and free
671ssh 1.2.12 release by Tatu Ylonen.
672Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
673Theo de Raadt and Dug Song
674removed many bugs, re-added newer features and
675created OpenSSH.
676Markus Friedl contributed the support for SSH
677protocol versions 1.5 and 2.0.
This page took 0.159112 seconds and 5 git commands to generate.