summaryrefslogtreecommitdiff
path: root/ssh.1
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.1')
-rw-r--r--ssh.159
1 files changed, 25 insertions, 34 deletions
diff --git a/ssh.1 b/ssh.1
index 7760c3075..9480eba8d 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.399 2018/09/20 06:58:48 jmc Exp $ 36.\" $OpenBSD: ssh.1,v 1.402 2019/03/16 19:14:21 jmc Exp $
37.Dd $Mdocdate: September 20 2018 $ 37.Dd $Mdocdate: March 16 2019 $
38.Dt SSH 1 38.Dt SSH 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -270,8 +270,8 @@ on the master process.
270.It Fl I Ar pkcs11 270.It Fl I Ar pkcs11
271Specify the PKCS#11 shared library 271Specify the PKCS#11 shared library
272.Nm 272.Nm
273should use to communicate with a PKCS#11 token providing the user's 273should use to communicate with a PKCS#11 token providing keys for user
274private RSA key. 274authentication.
275.Pp 275.Pp
276.It Fl i Ar identity_file 276.It Fl i Ar identity_file
277Selects a file from which the identity (private key) for 277Selects a file from which the identity (private key) for
@@ -308,6 +308,11 @@ Multiple jump hops may be specified separated by comma characters.
308This is a shortcut to specify a 308This is a shortcut to specify a
309.Cm ProxyJump 309.Cm ProxyJump
310configuration directive. 310configuration directive.
311Note that configuration directives supplied on the command-line generally
312apply to the destination host and not any specified jump hosts.
313Use
314.Pa ~/.ssh/config
315to specify configuration for jump hosts.
311.Pp 316.Pp
312.It Fl K 317.It Fl K
313Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI 318Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
@@ -1085,49 +1090,35 @@ Increase the verbosity
1085when errors are being written to stderr. 1090when errors are being written to stderr.
1086.El 1091.El
1087.Sh TCP FORWARDING 1092.Sh TCP FORWARDING
1088Forwarding of arbitrary TCP connections over the secure channel can 1093Forwarding of arbitrary TCP connections over a secure channel
1089be specified either on the command line or in a configuration file. 1094can be specified either on the command line or in a configuration file.
1090One possible application of TCP forwarding is a secure connection to a 1095One possible application of TCP forwarding is a secure connection to a
1091mail server; another is going through firewalls. 1096mail server; another is going through firewalls.
1092.Pp 1097.Pp
1093In the example below, we look at encrypting communication between 1098In the example below, we look at encrypting communication for an IRC client,
1094an IRC client and server, even though the IRC server does not directly 1099even though the IRC server it connects to does not directly
1095support encrypted communications. 1100support encrypted communication.
1096This works as follows: 1101This works as follows:
1097the user connects to the remote host using 1102the user connects to the remote host using
1098.Nm , 1103.Nm ,
1099specifying a port to be used to forward connections 1104specifying the ports to be used to forward the connection.
1100to the remote server. 1105After that it is possible to start the program locally,
1101After that it is possible to start the service which is to be encrypted
1102on the client machine,
1103connecting to the same local port,
1104and 1106and
1105.Nm 1107.Nm
1106will encrypt and forward the connection. 1108will encrypt and forward the connection to the remote server.
1107.Pp 1109.Pp
1108The following example tunnels an IRC session from client machine 1110The following example tunnels an IRC session from the client
1109.Dq 127.0.0.1 1111to an IRC server at
1110(localhost)
1111to remote server
1112.Dq server.example.com :
1113.Bd -literal -offset 4n
1114$ ssh -f -L 1234:localhost:6667 server.example.com sleep 10
1115$ irc -c '#users' -p 1234 pinky 127.0.0.1
1116.Ed
1117.Pp
1118This tunnels a connection to IRC server
1119.Dq server.example.com , 1112.Dq server.example.com ,
1120joining channel 1113joining channel
1121.Dq #users , 1114.Dq #users ,
1122nickname 1115nickname
1123.Dq pinky , 1116.Dq pinky ,
1124using port 1234. 1117using the standard IRC port, 6667:
1125It doesn't matter which port is used, 1118.Bd -literal -offset 4n
1126as long as it's greater than 1023 1119$ ssh -f -L 6667:localhost:6667 server.example.com sleep 10
1127(remember, only root can open sockets on privileged ports) 1120$ irc -c '#users' pinky IRC/127.0.0.1
1128and doesn't conflict with any ports already in use. 1121.Ed
1129The connection is forwarded to port 6667 on the remote server,
1130since that's the standard port for IRC services.
1131.Pp 1122.Pp
1132The 1123The
1133.Fl f 1124.Fl f
@@ -1137,7 +1128,7 @@ and the remote command
1137.Dq sleep 10 1128.Dq sleep 10
1138is specified to allow an amount of time 1129is specified to allow an amount of time
1139(10 seconds, in the example) 1130(10 seconds, in the example)
1140to start the service which is to be tunnelled. 1131to start the program which is going to use the tunnel.
1141If no connections are made within the time specified, 1132If no connections are made within the time specified,
1142.Nm 1133.Nm
1143will exit. 1134will exit.