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