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