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