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