summaryrefslogtreecommitdiff
path: root/ssh.1
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.1')
-rw-r--r--ssh.1129
1 files changed, 108 insertions, 21 deletions
diff --git a/ssh.1 b/ssh.1
index df7ac86af..2ea0a2058 100644
--- a/ssh.1
+++ b/ssh.1
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh.1,v 1.358 2015/05/22 05:28:45 djm Exp $ 36.\" $OpenBSD: ssh.1,v 1.361 2015/07/20 18:44:12 millert Exp $
37.Dd $Mdocdate: May 22 2015 $ 37.Dd $Mdocdate: July 20 2015 $
38.Dt SSH 1 38.Dt SSH 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -52,14 +52,14 @@
52.Op Fl F Ar configfile 52.Op Fl F Ar configfile
53.Op Fl I Ar pkcs11 53.Op Fl I Ar pkcs11
54.Op Fl i Ar identity_file 54.Op Fl i Ar identity_file
55.Op Fl L Oo Ar bind_address : Oc Ns Ar port : Ns Ar host : Ns Ar hostport 55.Op Fl L Ar address
56.Op Fl l Ar login_name 56.Op Fl l Ar login_name
57.Op Fl m Ar mac_spec 57.Op Fl m Ar mac_spec
58.Op Fl O Ar ctl_cmd 58.Op Fl O Ar ctl_cmd
59.Op Fl o Ar option 59.Op Fl o Ar option
60.Op Fl p Ar port 60.Op Fl p Ar port
61.Op Fl Q Cm cipher | cipher-auth | mac | kex | key | protocol-version 61.Op Fl Q Cm cipher | cipher-auth | mac | kex | key | protocol-version
62.Op Fl R Oo Ar bind_address : Oc Ns Ar port : Ns Ar host : Ns Ar hostport 62.Op Fl R Ar address
63.Op Fl S Ar ctl_path 63.Op Fl S Ar ctl_path
64.Op Fl W Ar host : Ns Ar port 64.Op Fl W Ar host : Ns Ar port
65.Op Fl w Ar local_tun Ns Op : Ns Ar remote_tun 65.Op Fl w Ar local_tun Ns Op : Ns Ar remote_tun
@@ -93,23 +93,28 @@ is specified,
93it is executed on the remote host instead of a login shell. 93it is executed on the remote host instead of a login shell.
94.Pp 94.Pp
95The options are as follows: 95The options are as follows:
96.Bl -tag -width Ds 96.Pp
97.Bl -tag -width Ds -compact
97.It Fl 1 98.It Fl 1
98Forces 99Forces
99.Nm 100.Nm
100to try protocol version 1 only. 101to try protocol version 1 only.
102.Pp
101.It Fl 2 103.It Fl 2
102Forces 104Forces
103.Nm 105.Nm
104to try protocol version 2 only. 106to try protocol version 2 only.
107.Pp
105.It Fl 4 108.It Fl 4
106Forces 109Forces
107.Nm 110.Nm
108to use IPv4 addresses only. 111to use IPv4 addresses only.
112.Pp
109.It Fl 6 113.It Fl 6
110Forces 114Forces
111.Nm 115.Nm
112to use IPv6 addresses only. 116to use IPv6 addresses only.
117.Pp
113.It Fl A 118.It Fl A
114Enables forwarding of the authentication agent connection. 119Enables forwarding of the authentication agent connection.
115This can also be specified on a per-host basis in a configuration file. 120This can also be specified on a per-host basis in a configuration file.
@@ -122,14 +127,17 @@ socket) can access the local agent through the forwarded connection.
122An attacker cannot obtain key material from the agent, 127An attacker cannot obtain key material from the agent,
123however they can perform operations on the keys that enable them to 128however they can perform operations on the keys that enable them to
124authenticate using the identities loaded into the agent. 129authenticate using the identities loaded into the agent.
130.Pp
125.It Fl a 131.It Fl a
126Disables forwarding of the authentication agent connection. 132Disables forwarding of the authentication agent connection.
133.Pp
127.It Fl b Ar bind_address 134.It Fl b Ar bind_address
128Use 135Use
129.Ar bind_address 136.Ar bind_address
130on the local machine as the source address 137on the local machine as the source address
131of the connection. 138of the connection.
132Only useful on systems with more than one address. 139Only useful on systems with more than one address.
140.Pp
133.It Fl C 141.It Fl C
134Requests compression of all data (including stdin, stdout, stderr, and 142Requests compression of all data (including stdin, stdout, stderr, and
135data for forwarded X11, TCP and 143data for forwarded X11, TCP and
@@ -148,6 +156,7 @@ The default value can be set on a host-by-host basis in the
148configuration files; see the 156configuration files; see the
149.Cm Compression 157.Cm Compression
150option. 158option.
159.Pp
151.It Fl c Ar cipher_spec 160.It Fl c Ar cipher_spec
152Selects the cipher specification for encrypting the session. 161Selects the cipher specification for encrypting the session.
153.Pp 162.Pp
@@ -166,6 +175,7 @@ See the
166keyword in 175keyword in
167.Xr ssh_config 5 176.Xr ssh_config 5
168for more information. 177for more information.
178.Pp
169.It Fl D Xo 179.It Fl D Xo
170.Sm off 180.Sm off
171.Oo Ar bind_address : Oc 181.Oo Ar bind_address : Oc
@@ -205,10 +215,12 @@ indicates that the listening port be bound for local use only, while an
205empty address or 215empty address or
206.Sq * 216.Sq *
207indicates that the port should be available from all interfaces. 217indicates that the port should be available from all interfaces.
218.Pp
208.It Fl E Ar log_file 219.It Fl E Ar log_file
209Append debug logs to 220Append debug logs to
210.Ar log_file 221.Ar log_file
211instead of standard error. 222instead of standard error.
223.Pp
212.It Fl e Ar escape_char 224.It Fl e Ar escape_char
213Sets the escape character for sessions with a pty (default: 225Sets the escape character for sessions with a pty (default:
214.Ql ~ ) . 226.Ql ~ ) .
@@ -221,6 +233,7 @@ and followed by itself sends the escape character once.
221Setting the character to 233Setting the character to
222.Dq none 234.Dq none
223disables any escapes and makes the session fully transparent. 235disables any escapes and makes the session fully transparent.
236.Pp
224.It Fl F Ar configfile 237.It Fl F Ar configfile
225Specifies an alternative per-user configuration file. 238Specifies an alternative per-user configuration file.
226If a configuration file is given on the command line, 239If a configuration file is given on the command line,
@@ -229,6 +242,7 @@ the system-wide configuration file
229will be ignored. 242will be ignored.
230The default for the per-user configuration file is 243The default for the per-user configuration file is
231.Pa ~/.ssh/config . 244.Pa ~/.ssh/config .
245.Pp
232.It Fl f 246.It Fl f
233Requests 247Requests
234.Nm 248.Nm
@@ -251,6 +265,7 @@ then a client started with
251.Fl f 265.Fl f
252will wait for all remote port forwards to be successfully established 266will wait for all remote port forwards to be successfully established
253before placing itself in the background. 267before placing itself in the background.
268.Pp
254.It Fl G 269.It Fl G
255Causes 270Causes
256.Nm 271.Nm
@@ -259,15 +274,18 @@ to print its configuration after evaluating
259and 274and
260.Cm Match 275.Cm Match
261blocks and exit. 276blocks and exit.
277.Pp
262.It Fl g 278.It Fl g
263Allows remote hosts to connect to local forwarded ports. 279Allows remote hosts to connect to local forwarded ports.
264If used on a multiplexed connection, then this option must be specified 280If used on a multiplexed connection, then this option must be specified
265on the master process. 281on the master process.
282.Pp
266.It Fl I Ar pkcs11 283.It Fl I Ar pkcs11
267Specify the PKCS#11 shared library 284Specify the PKCS#11 shared library
268.Nm 285.Nm
269should use to communicate with a PKCS#11 token providing the user's 286should use to communicate with a PKCS#11 token providing the user's
270private RSA key. 287private RSA key.
288.Pp
271.It Fl i Ar identity_file 289.It Fl i Ar identity_file
272Selects a file from which the identity (private key) for 290Selects a file from which the identity (private key) for
273public key authentication is read. 291public key authentication is read.
@@ -291,33 +309,58 @@ will also try to load certificate information from the filename obtained
291by appending 309by appending
292.Pa -cert.pub 310.Pa -cert.pub
293to identity filenames. 311to identity filenames.
312.Pp
294.It Fl K 313.It Fl K
295Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI 314Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
296credentials to the server. 315credentials to the server.
316.Pp
297.It Fl k 317.It Fl k
298Disables forwarding (delegation) of GSSAPI credentials to the server. 318Disables forwarding (delegation) of GSSAPI credentials to the server.
319.Pp
299.It Fl L Xo 320.It Fl L Xo
300.Sm off 321.Sm off
301.Oo Ar bind_address : Oc 322.Oo Ar bind_address : Oc
302.Ar port : host : hostport 323.Ar port : host : hostport
303.Sm on 324.Sm on
304.Xc 325.Xc
305Specifies that the given port on the local (client) host is to be 326.It Fl L Xo
306forwarded to the given host and port on the remote side. 327.Sm off
307This works by allocating a socket to listen to 328.Oo Ar bind_address : Oc
329.Ar port : remote_socket
330.Sm on
331.Xc
332.It Fl L Xo
333.Sm off
334.Ar local_socket : host : hostport
335.Sm on
336.Xc
337.It Fl L Xo
338.Sm off
339.Ar local_socket : remote_socket
340.Sm on
341.Xc
342Specifies that connections to the given TCP port or Unix socket on the local
343(client) host are to be forwarded to the given host and port, or Unix socket,
344on the remote side.
345This works by allocating a socket to listen to either a TCP
308.Ar port 346.Ar port
309on the local side, optionally bound to the specified 347on the local side, optionally bound to the specified
310.Ar bind_address . 348.Ar bind_address ,
311Whenever a connection is made to this port, the 349or to a Unix socket.
350Whenever a connection is made to the local port or socket, the
312connection is forwarded over the secure channel, and a connection is 351connection is forwarded over the secure channel, and a connection is
313made to 352made to either
314.Ar host 353.Ar host
315port 354port
316.Ar hostport 355.Ar hostport ,
356or the Unix socket
357.Ar remote_socket ,
317from the remote machine. 358from the remote machine.
359.Pp
318Port forwardings can also be specified in the configuration file. 360Port forwardings can also be specified in the configuration file.
319IPv6 addresses can be specified by enclosing the address in square brackets.
320Only the superuser can forward privileged ports. 361Only the superuser can forward privileged ports.
362IPv6 addresses can be specified by enclosing the address in square brackets.
363.Pp
321By default, the local port is bound in accordance with the 364By default, the local port is bound in accordance with the
322.Cm GatewayPorts 365.Cm GatewayPorts
323setting. 366setting.
@@ -332,9 +375,11 @@ indicates that the listening port be bound for local use only, while an
332empty address or 375empty address or
333.Sq * 376.Sq *
334indicates that the port should be available from all interfaces. 377indicates that the port should be available from all interfaces.
378.Pp
335.It Fl l Ar login_name 379.It Fl l Ar login_name
336Specifies the user to log in as on the remote machine. 380Specifies the user to log in as on the remote machine.
337This also may be specified on a per-host basis in the configuration file. 381This also may be specified on a per-host basis in the configuration file.
382.Pp
338.It Fl M 383.It Fl M
339Places the 384Places the
340.Nm 385.Nm
@@ -353,6 +398,7 @@ Refer to the description of
353in 398in
354.Xr ssh_config 5 399.Xr ssh_config 5
355for details. 400for details.
401.Pp
356.It Fl m Ar mac_spec 402.It Fl m Ar mac_spec
357Additionally, for protocol version 2 a comma-separated list of MAC 403Additionally, for protocol version 2 a comma-separated list of MAC
358(message authentication code) algorithms can 404(message authentication code) algorithms can
@@ -360,10 +406,12 @@ be specified in order of preference.
360See the 406See the
361.Cm MACs 407.Cm MACs
362keyword for more information. 408keyword for more information.
409.Pp
363.It Fl N 410.It Fl N
364Do not execute a remote command. 411Do not execute a remote command.
365This is useful for just forwarding ports 412This is useful for just forwarding ports
366(protocol version 2 only). 413(protocol version 2 only).
414.Pp
367.It Fl n 415.It Fl n
368Redirects stdin from 416Redirects stdin from
369.Pa /dev/null 417.Pa /dev/null
@@ -384,6 +432,7 @@ program will be put in the background.
384needs to ask for a password or passphrase; see also the 432needs to ask for a password or passphrase; see also the
385.Fl f 433.Fl f
386option.) 434option.)
435.Pp
387.It Fl O Ar ctl_cmd 436.It Fl O Ar ctl_cmd
388Control an active connection multiplexing master process. 437Control an active connection multiplexing master process.
389When the 438When the
@@ -402,6 +451,7 @@ Valid commands are:
402(request the master to exit), and 451(request the master to exit), and
403.Dq stop 452.Dq stop
404(request the master to stop accepting further multiplexing requests). 453(request the master to stop accepting further multiplexing requests).
454.Pp
405.It Fl o Ar option 455.It Fl o Ar option
406Can be used to give options in the format used in the configuration file. 456Can be used to give options in the format used in the configuration file.
407This is useful for specifying options for which there is no separate 457This is useful for specifying options for which there is no separate
@@ -470,6 +520,7 @@ For full details of the options listed below, and their possible values, see
470.It Protocol 520.It Protocol
471.It ProxyCommand 521.It ProxyCommand
472.It ProxyUseFdpass 522.It ProxyUseFdpass
523.It PubkeyAcceptedKeyTypes
473.It PubkeyAuthentication 524.It PubkeyAuthentication
474.It RekeyLimit 525.It RekeyLimit
475.It RemoteForward 526.It RemoteForward
@@ -493,10 +544,12 @@ For full details of the options listed below, and their possible values, see
493.It VisualHostKey 544.It VisualHostKey
494.It XAuthLocation 545.It XAuthLocation
495.El 546.El
547.Pp
496.It Fl p Ar port 548.It Fl p Ar port
497Port to connect to on the remote host. 549Port to connect to on the remote host.
498This can be specified on a 550This can be specified on a
499per-host basis in the configuration file. 551per-host basis in the configuration file.
552.Pp
500.It Fl Q Cm cipher | cipher-auth | mac | kex | key | protocol-version 553.It Fl Q Cm cipher | cipher-auth | mac | kex | key | protocol-version
501Queries 554Queries
502.Nm 555.Nm
@@ -514,25 +567,47 @@ The available features are:
514(key types) and 567(key types) and
515.Ar protocol-version 568.Ar protocol-version
516(supported SSH protocol versions). 569(supported SSH protocol versions).
570.Pp
517.It Fl q 571.It Fl q
518Quiet mode. 572Quiet mode.
519Causes most warning and diagnostic messages to be suppressed. 573Causes most warning and diagnostic messages to be suppressed.
574.Pp
520.It Fl R Xo 575.It Fl R Xo
521.Sm off 576.Sm off
522.Oo Ar bind_address : Oc 577.Oo Ar bind_address : Oc
523.Ar port : host : hostport 578.Ar port : host : hostport
524.Sm on 579.Sm on
525.Xc 580.Xc
526Specifies that the given port on the remote (server) host is to be 581.It Fl R Xo
527forwarded to the given host and port on the local side. 582.Sm off
528This works by allocating a socket to listen to 583.Oo Ar bind_address : Oc
584.Ar port : local_socket
585.Sm on
586.Xc
587.It Fl R Xo
588.Sm off
589.Ar remote_socket : host : hostport
590.Sm on
591.Xc
592.It Fl R Xo
593.Sm off
594.Ar remote_socket : local_socket
595.Sm on
596.Xc
597Specifies that connections to the given TCP port or Unix socket on the remote
598(server) host are to be forwarded to the given host and port, or Unix socket,
599on the local side.
600This works by allocating a socket to listen to either a TCP
529.Ar port 601.Ar port
530on the remote side, and whenever a connection is made to this port, the 602or to a Unix socket on the remote side.
531connection is forwarded over the secure channel, and a connection is 603Whenever a connection is made to this port or Unix socket, the
532made to 604connection is forwarded over the secure channel, and a connection
605is made to either
533.Ar host 606.Ar host
534port 607port
535.Ar hostport 608.Ar hostport ,
609or
610.Ar local_socket ,
536from the local machine. 611from the local machine.
537.Pp 612.Pp
538Port forwardings can also be specified in the configuration file. 613Port forwardings can also be specified in the configuration file.
@@ -540,7 +615,7 @@ Privileged ports can be forwarded only when
540logging in as root on the remote machine. 615logging in as root on the remote machine.
541IPv6 addresses can be specified by enclosing the address in square brackets. 616IPv6 addresses can be specified by enclosing the address in square brackets.
542.Pp 617.Pp
543By default, the listening socket on the server will be bound to the loopback 618By default, TCP listening sockets on the server will be bound to the loopback
544interface only. 619interface only.
545This may be overridden by specifying a 620This may be overridden by specifying a
546.Ar bind_address . 621.Ar bind_address .
@@ -565,6 +640,7 @@ to the client at run time.
565When used together with 640When used together with
566.Ic -O forward 641.Ic -O forward
567the allocated port will be printed to the standard output. 642the allocated port will be printed to the standard output.
643.Pp
568.It Fl S Ar ctl_path 644.It Fl S Ar ctl_path
569Specifies the location of a control socket for connection sharing, 645Specifies the location of a control socket for connection sharing,
570or the string 646or the string
@@ -577,14 +653,17 @@ and
577in 653in
578.Xr ssh_config 5 654.Xr ssh_config 5
579for details. 655for details.
656.Pp
580.It Fl s 657.It Fl s
581May be used to request invocation of a subsystem on the remote system. 658May be used to request invocation of a subsystem on the remote system.
582Subsystems are a feature of the SSH2 protocol which facilitate the use 659Subsystems are a feature of the SSH2 protocol which facilitate the use
583of SSH as a secure transport for other applications (eg.\& 660of SSH as a secure transport for other applications (eg.\&
584.Xr sftp 1 ) . 661.Xr sftp 1 ) .
585The subsystem is specified as the remote command. 662The subsystem is specified as the remote command.
663.Pp
586.It Fl T 664.It Fl T
587Disable pseudo-terminal allocation. 665Disable pseudo-terminal allocation.
666.Pp
588.It Fl t 667.It Fl t
589Force pseudo-terminal allocation. 668Force pseudo-terminal allocation.
590This can be used to execute arbitrary 669This can be used to execute arbitrary
@@ -595,8 +674,10 @@ Multiple
595options force tty allocation, even if 674options force tty allocation, even if
596.Nm 675.Nm
597has no local tty. 676has no local tty.
677.Pp
598.It Fl V 678.It Fl V
599Display the version number and exit. 679Display the version number and exit.
680.Pp
600.It Fl v 681.It Fl v
601Verbose mode. 682Verbose mode.
602Causes 683Causes
@@ -608,6 +689,7 @@ Multiple
608.Fl v 689.Fl v
609options increase the verbosity. 690options increase the verbosity.
610The maximum is 3. 691The maximum is 3.
692.Pp
611.It Fl W Ar host : Ns Ar port 693.It Fl W Ar host : Ns Ar port
612Requests that standard input and output on the client be forwarded to 694Requests that standard input and output on the client be forwarded to
613.Ar host 695.Ar host
@@ -621,6 +703,7 @@ Implies
621and 703and
622.Cm ClearAllForwardings . 704.Cm ClearAllForwardings .
623Works with Protocol version 2 only. 705Works with Protocol version 2 only.
706.Pp
624.It Fl w Xo 707.It Fl w Xo
625.Ar local_tun Ns Op : Ns Ar remote_tun 708.Ar local_tun Ns Op : Ns Ar remote_tun
626.Xc 709.Xc
@@ -650,6 +733,7 @@ If the
650.Cm Tunnel 733.Cm Tunnel
651directive is unset, it is set to the default tunnel mode, which is 734directive is unset, it is set to the default tunnel mode, which is
652.Dq point-to-point . 735.Dq point-to-point .
736.Pp
653.It Fl X 737.It Fl X
654Enables X11 forwarding. 738Enables X11 forwarding.
655This can also be specified on a per-host basis in a configuration file. 739This can also be specified on a per-host basis in a configuration file.
@@ -670,12 +754,15 @@ option and the
670directive in 754directive in
671.Xr ssh_config 5 755.Xr ssh_config 5
672for more information. 756for more information.
757.Pp
673.It Fl x 758.It Fl x
674Disables X11 forwarding. 759Disables X11 forwarding.
760.Pp
675.It Fl Y 761.It Fl Y
676Enables trusted X11 forwarding. 762Enables trusted X11 forwarding.
677Trusted X11 forwardings are not subjected to the X11 SECURITY extension 763Trusted X11 forwardings are not subjected to the X11 SECURITY extension
678controls. 764controls.
765.Pp
679.It Fl y 766.It Fl y
680Send log information using the 767Send log information using the
681.Xr syslog 3 768.Xr syslog 3