SSH Tunnelling, How to.

Monday, August 1, 2011

How to use a SSH Tunnel

One simple command and thats all you need to do, besides from pointing your programs to use the correct port is:
ssh -ND 50000
-N: Means that it will not execute the ssh session to your destination. So if you were going to only have a proxy connection and did not need a shell to open up, then you would add this. I would also suggest running it in a screen so it can run ssh in the background. Allowing you to have a running proxy and no need for terminal to stay up.

-D: This is where all the magic happens. The correct usage is > "[ip:]port" and if no ip is used then just the port. This is great for when you need to have multiple connections and enabling you to possible run a proxy through 1 network connection, and enable your system to run through the other network card.

Mind you, this is only for the people who would like to ssh from a unsecure network to a more "secure" network. Because after the tunnel has ended, the security the ssh tunnel enforces are lost at the other end.

Okay so that is how to use it. Next is how to set one up.


Randall A. said...

I didn't even know what SSH tunneling was before this, wow. I thought it would be much more complicated..

Post a Comment