Re: port forwarding

From: Darren Dunham (ddunham_at_redwood.taos.com)
Date: 06/20/05


Date: Mon, 20 Jun 2005 17:28:09 GMT

Payal <payalrathod@gmail.com> wrote:
>> Payal> ssh -L 1100:scriptkitchen.com:110 example.net

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

A "tunnel" is always from your local machine to the ssh host
(example.net). All traffic is on port 22, encrypted.

Then, imagine you are on example.net and you connect to
scriptkitchen.com:110. That traffic is necessarily unencrypted.
Instead of being delivered to an application on example.com, the traffic
is sent into the tunnel back to your local workstation and then bound to
your port of choice (1100).

The host portion of the address (scriptkitchen.com) is always from the
point of view of the ssh server (example.net here). So if you use
port:localhost:hostport, then 'localhost' means the example.net server.

-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >


Relevant Pages

  • RE: Tunneling over ssh with termination by the FW
    ... I would use something like Putty (ssh client software) to open a secure ... tunnel with the firewall. ... If the firewall has the sshd running on port ...
    (SSH)
  • Re: reverse ssh
    ... > logged into either box) can use the tunnel for whatever connects to it. ... > I suggest you connnect back to your home system's 'sshd' port and then you ... > will have to satisfy the home box's login authorization to get access ... > password from your script. ...
    (freebsd-questions)
  • Re: vnc over ssh
    ... > So the following line would set up the tunnel to VNC the remote machine ... am sitting in front of will now forward information from port ... unencrypted and ready for the vncServer to respond. ... Nick Williams:) ...
    (comp.security.ssh)
  • Re: Reverse Shell?
    ... >> behind a firewall so I can't ssh into their computer. ... > follow the tunnel back to their machine and then help them. ... Connections to that port will be forwarded through the ...
    (Debian-User)
  • Re: VNC Through WinSSHD
    ... But you NEED to know the port ... >> number for establishing the tunnel. ... When starting the local vnc viewer, you must enter the "remote" host ... For the remote end of the tunnel you specify either the real name or the ...
    (comp.security.ssh)