summaryrefslogtreecommitdiff
path: root/ssh.1
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-01-14 10:09:13 +1100
committerDamien Miller <djm@mindrot.org>2006-01-14 10:09:13 +1100
commitf31771810cf89a3e687112e71264be266012b2de (patch)
tree33cd75a414230d895223e00cee68bf28c2fc7ecc /ssh.1
parent7e76e1f101cf672df9ca1822f2a04cb4289df519 (diff)
- jmc@cvs.openbsd.org 2006/01/12 14:44:12
[ssh.1] split sections on tcp and x11 forwarding into two sections. add an example in the tcp section, based on sth i wrote for ssh faq; help + ok: djm markus dtucker
Diffstat (limited to 'ssh.1')
-rw-r--r--ssh.169
1 files changed, 62 insertions, 7 deletions
diff --git a/ssh.1 b/ssh.1
index 0ebe177f5..c15cfc319 100644
--- a/ssh.1
+++ b/ssh.1
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 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. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: ssh.1,v 1.245 2006/01/06 13:29:10 jmc Exp $ 37.\" $OpenBSD: ssh.1,v 1.246 2006/01/12 14:44:12 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSH 1 39.Dt SSH 1
40.Os 40.Os
@@ -893,7 +893,67 @@ option.
893Request rekeying of the connection 893Request rekeying of the connection
894(only useful for SSH protocol version 2 and if the peer supports it). 894(only useful for SSH protocol version 2 and if the peer supports it).
895.El 895.El
896.Sh X11 AND TCP FORWARDING 896.Sh TCP FORWARDING
897Forwarding of arbitrary TCP connections over the secure channel can
898be specified either on the command line or in a configuration file.
899One possible application of TCP forwarding is a secure connection to a
900mail server; another is going through firewalls.
901.Pp
902In the example below, we look at encrypting communication between
903an IRC client and server, even though the IRC server does not directly
904support encrypted communications.
905This works as follows:
906the user connects to the remote host using
907.Nm ,
908specifying a port to be used to forward connections
909to the remote server.
910After that it is possible to start the service which is to be encrypted
911on the client machine,
912connecting to the same local port,
913and
914.Nm
915will encrypt and forward the connection.
916.Pp
917The following example tunnels an IRC session from client machine
918.Dq 127.0.0.1
919(localhost)
920to remote server
921.Dq server.example.com :
922.Bd -literal -offset 4n
923$ ssh -f -L 1234:localhost:6667 server.example.com sleep 10
924$ irc -c '#users' -p 1234 pinky 127.0.0.1
925.Ed
926.Pp
927This tunnels a connection to IRC server
928.Dq server.example.com ,
929joining channel
930.Dq #users ,
931nickname
932.Dq pinky ,
933using port 1234.
934It doesn't matter which port is used,
935as long as it's greater than 1023
936(remember, only root can open sockets on privileged ports)
937and doesn't conflict with any ports already in use.
938The connection is forwarded to port 6667 on the remote server,
939since that's the standard port for IRC services.
940.Pp
941The
942.Fl f
943option backgrounds
944.Nm
945and the remote command
946.Dq sleep 10
947is specified to allow an amount of time
948(10 seconds, in the example)
949to start the service which is to be tunnelled.
950If no connections are made within the time specified,
951.Nm
952will exit.
953Once opened,
954a SSH connection will remain active
955until all actively forwarded connections have closed.
956.Sh X11 FORWARDING
897If the 957If the
898.Cm ForwardX11 958.Cm ForwardX11
899variable is set to 959variable is set to
@@ -948,11 +1008,6 @@ and
948options above) and 1008options above) and
949the user is using an authentication agent, the connection to the agent 1009the user is using an authentication agent, the connection to the agent
950is automatically forwarded to the remote side. 1010is automatically forwarded to the remote side.
951.Pp
952Forwarding of arbitrary TCP/IP connections over the secure channel can
953be specified either on the command line or in a configuration file.
954One possible application of TCP/IP forwarding is a secure connection to an
955electronic purse; another is going through firewalls.
956.Sh ENVIRONMENT 1011.Sh ENVIRONMENT
957.Nm 1012.Nm
958will normally set the following environment variables: 1013will normally set the following environment variables: