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