[plug] SSH Tunnel

Russell Steicke r.steicke at bom.gov.au
Thu Apr 6 10:57:33 WST 2006


On Thu, Apr 06, 2006 at 10:00:48AM +0800, Michael L. Benjamin wrote:
>  
> I'm attempting to setup an SSH tunnel without too much success.
>  
> What I want to be able to do is SSH tunnel from an XP machine to a Linux
> box, then from there access a remote Linux mail machine running POP3.
>  
> Then I'd setup a PuTTY session with the local port forwarding so that I
> can connect a POP3 mail client to localhost on a port that would connect
> via the SSH tunnel
> to the first remote server.
>  
> So, say connect to localhost:9999 which connects to server1:9998 which
> in turn connects to mail.somewhere.net:110 
>  
> Can anyone suggest a good way of doing this? Is it feasible, and do I
> need to use a combination of SSH and netcat?

The easiest solution: use pop3s if it's supported at the far end.

Using port forwarding with a Linux client:

  ssh -L 9999:localhost:9998 -R 9998:server2:110 server1

This double port forwarding works well.

Incidentally, the ports can be the same number because they're being
bound on different machines:

  ssh -L 9999:localhost:9999 -R 9999:server2:110 server1

For a Windows client, you need to convert the -L and -R options to
port forwarding specs in the appropriate place in the dialog.






-- 
Russell Steicke

-- Fortune says:
If you are over 80 years old and accompanied by your parents, we will
cash your check.



More information about the plug mailing list