[plug] SSH Tunnel

Michael L. Benjamin mike.benjamin at clarinet.com.au
Thu Apr 6 11:02:37 WST 2006


Thanks, this seems to work nicely:

ssh -L 9999:localhost:9998 -R 9998:mail.iinet.net.au:110 localhost -l
username

Looks like I don't need to get netcat involved at all, which is nice. :)

I'll continue with the client side of things, thanks for the help.



-----Original Message-----
From: plug-bounces at plug.org.au [mailto:plug-bounces at plug.org.au] On
Behalf Of Russell Steicke
Sent: Thursday, April 06, 2006 10:58 AM
To: plug at plug.org.au
Subject: Re: [plug] SSH Tunnel

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.
_______________________________________________
PLUG discussion list: plug at plug.org.au
http://www.plug.org.au/mailman/listinfo/plug
Committee e-mail: committee at plug.linux.org.au



More information about the plug mailing list