Re: port forwarding

From: Richard E. Silverman (res_at_qoxp.net)
Date: 06/18/05


Date: 18 Jun 2005 02:22:37 -0400


>>>>> "Payal" == Payal <payalrathod@gmail.com> writes:

    Payal> Hello, Still not clear on this at all. I will ask specific
    Payal> question down.

    Payal> Richard E. Silverman wrote: ssh -L 1100:localhost:110
    Payal> example.net
>>
    Payal> When I connect to 127.0.0.1:1100 I am connected to
    Payal> example.net:110?

    Payal> So a tunnel is created from my "localhost:1100" to
    Payal> example.net:110 Right?

    Payal> ssh -L 1100:scriptkitchen.com:110 example.net

    Payal> So a tunnel is created from "scriptkitchen.com:1100" to
    Payal> example.net:110 But where is "localhost" mentioned? How does
    Payal> the traffic go from my machine to scriptkitchen? Is that
    Payal> encrypted? And from which port? I don't follow this at all.

$ man ssh
...
     -L port:host:hostport
             Specifies that the given port on the local (client) host is to be
             forwarded to the given host and port on the remote side. This
             works by allocating a socket to listen to port on the local side,
             and whenever a connection is made to this port, the connection is
             forwarded over the secure channel, and a connection is made to
             host port hostport from the remote machine. Port forwardings can
             also be specified in the configuration file...

-- 
  Richard Silverman
  res@qoxp.net