summaryrefslogtreecommitdiff
path: root/ssh.1
diff options
context:
space:
mode:
authormillert@openbsd.org <millert@openbsd.org>2015-07-20 15:39:52 +0000
committerDamien Miller <djm@mindrot.org>2015-07-21 13:05:12 +1000
commit79ec2142fbc68dd2ed9688608da355fc0b1ed743 (patch)
tree295f4a22053564048aa310b48b9989d964c21ba7 /ssh.1
parentd56fd1828074a4031b18b8faa0bf949669eb18a0 (diff)
upstream commit
Better desciption of Unix domain socket forwarding. bz#2423; ok jmc@ Upstream-ID: 85e28874726897e3f26ae50dfa2e8d2de683805d
Diffstat (limited to 'ssh.1')
-rw-r--r--ssh.1128
1 files changed, 107 insertions, 21 deletions
diff --git a/ssh.1 b/ssh.1
index fa87c2795..85a2d8734 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.359 2015/07/10 06:21:53 markus Exp $ 36.\" $OpenBSD: ssh.1,v 1.360 2015/07/20 15:39:52 millert Exp $
37.Dd $Mdocdate: July 10 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.Bl -tag -width Ds -compact
97.Pp
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
@@ -494,10 +544,12 @@ For full details of the options listed below, and their possible values, see
494.It VisualHostKey 544.It VisualHostKey
495.It XAuthLocation 545.It XAuthLocation
496.El 546.El
547.Pp
497.It Fl p Ar port 548.It Fl p Ar port
498Port to connect to on the remote host. 549Port to connect to on the remote host.
499This can be specified on a 550This can be specified on a
500per-host basis in the configuration file. 551per-host basis in the configuration file.
552.Pp
501.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
502Queries 554Queries
503.Nm 555.Nm
@@ -515,25 +567,47 @@ The available features are:
515(key types) and 567(key types) and
516.Ar protocol-version 568.Ar protocol-version
517(supported SSH protocol versions). 569(supported SSH protocol versions).
570.Pp
518.It Fl q 571.It Fl q
519Quiet mode. 572Quiet mode.
520Causes most warning and diagnostic messages to be suppressed. 573Causes most warning and diagnostic messages to be suppressed.
574.Pp
521.It Fl R Xo 575.It Fl R Xo
522.Sm off 576.Sm off
523.Oo Ar bind_address : Oc 577.Oo Ar bind_address : Oc
524.Ar port : host : hostport 578.Ar port : host : hostport
525.Sm on 579.Sm on
526.Xc 580.Xc
527Specifies that the given port on the remote (server) host is to be 581.It Fl R Xo
528forwarded to the given host and port on the local side. 582.Sm off
529This 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
530.Ar port 601.Ar port
531on the remote side, and whenever a connection is made to this port, the 602or to a Unix socket on the remote side.
532connection is forwarded over the secure channel, and a connection is 603Whenever a connection is made to this port or Unix socket, the
533made to 604connection is forwarded over the secure channel, and a connection
605is made to either
534.Ar host 606.Ar host
535port 607port
536.Ar hostport 608.Ar hostport ,
609or
610.Ar local_socket ,
537from the local machine. 611from the local machine.
538.Pp 612.Pp
539Port forwardings can also be specified in the configuration file. 613Port forwardings can also be specified in the configuration file.
@@ -541,7 +615,7 @@ Privileged ports can be forwarded only when
541logging in as root on the remote machine. 615logging in as root on the remote machine.
542IPv6 addresses can be specified by enclosing the address in square brackets. 616IPv6 addresses can be specified by enclosing the address in square brackets.
543.Pp 617.Pp
544By 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
545interface only. 619interface only.
546This may be overridden by specifying a 620This may be overridden by specifying a
547.Ar bind_address . 621.Ar bind_address .
@@ -566,6 +640,7 @@ to the client at run time.
566When used together with 640When used together with
567.Ic -O forward 641.Ic -O forward
568the allocated port will be printed to the standard output. 642the allocated port will be printed to the standard output.
643.Pp
569.It Fl S Ar ctl_path 644.It Fl S Ar ctl_path
570Specifies the location of a control socket for connection sharing, 645Specifies the location of a control socket for connection sharing,
571or the string 646or the string
@@ -578,14 +653,17 @@ and
578in 653in
579.Xr ssh_config 5 654.Xr ssh_config 5
580for details. 655for details.
656.Pp
581.It Fl s 657.It Fl s
582May 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.
583Subsystems are a feature of the SSH2 protocol which facilitate the use 659Subsystems are a feature of the SSH2 protocol which facilitate the use
584of SSH as a secure transport for other applications (eg.\& 660of SSH as a secure transport for other applications (eg.\&
585.Xr sftp 1 ) . 661.Xr sftp 1 ) .
586The subsystem is specified as the remote command. 662The subsystem is specified as the remote command.
663.Pp
587.It Fl T 664.It Fl T
588Disable pseudo-terminal allocation. 665Disable pseudo-terminal allocation.
666.Pp
589.It Fl t 667.It Fl t
590Force pseudo-terminal allocation. 668Force pseudo-terminal allocation.
591This can be used to execute arbitrary 669This can be used to execute arbitrary
@@ -596,8 +674,10 @@ Multiple
596options force tty allocation, even if 674options force tty allocation, even if
597.Nm 675.Nm
598has no local tty. 676has no local tty.
677.Pp
599.It Fl V 678.It Fl V
600Display the version number and exit. 679Display the version number and exit.
680.Pp
601.It Fl v 681.It Fl v
602Verbose mode. 682Verbose mode.
603Causes 683Causes
@@ -609,6 +689,7 @@ Multiple
609.Fl v 689.Fl v
610options increase the verbosity. 690options increase the verbosity.
611The maximum is 3. 691The maximum is 3.
692.Pp
612.It Fl W Ar host : Ns Ar port 693.It Fl W Ar host : Ns Ar port
613Requests that standard input and output on the client be forwarded to 694Requests that standard input and output on the client be forwarded to
614.Ar host 695.Ar host
@@ -622,6 +703,7 @@ Implies
622and 703and
623.Cm ClearAllForwardings . 704.Cm ClearAllForwardings .
624Works with Protocol version 2 only. 705Works with Protocol version 2 only.
706.Pp
625.It Fl w Xo 707.It Fl w Xo
626.Ar local_tun Ns Op : Ns Ar remote_tun 708.Ar local_tun Ns Op : Ns Ar remote_tun
627.Xc 709.Xc
@@ -651,6 +733,7 @@ If the
651.Cm Tunnel 733.Cm Tunnel
652directive 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
653.Dq point-to-point . 735.Dq point-to-point .
736.Pp
654.It Fl X 737.It Fl X
655Enables X11 forwarding. 738Enables X11 forwarding.
656This 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.
@@ -671,12 +754,15 @@ option and the
671directive in 754directive in
672.Xr ssh_config 5 755.Xr ssh_config 5
673for more information. 756for more information.
757.Pp
674.It Fl x 758.It Fl x
675Disables X11 forwarding. 759Disables X11 forwarding.
760.Pp
676.It Fl Y 761.It Fl Y
677Enables trusted X11 forwarding. 762Enables trusted X11 forwarding.
678Trusted X11 forwardings are not subjected to the X11 SECURITY extension 763Trusted X11 forwardings are not subjected to the X11 SECURITY extension
679controls. 764controls.
765.Pp
680.It Fl y 766.It Fl y
681Send log information using the 767Send log information using the
682.Xr syslog 3 768.Xr syslog 3