Creating an SSH Tunnel

Discuss anything about technology or computers here, other than programming.

Creating an SSH Tunnel

Postby tronics on Tue Jul 25, 2006 10:22 am

Would anyone care to share an easy method on creating an SSH secure Tunnel between Windows/Unix platforms? When I first heard about them which was years ago, the process seemed a bit convoluted/complicated. I've not taken the time to yet research again the method of creating a tunnel, hence the post. I'm sure those who've dealt w/ ssh are familiar w/ the process.

Thanks,
tronics
Newbie
Newbie
 
Posts: 16
Joined: Tue Jul 25, 2006 9:29 am

Postby Vihtor on Tue Jul 25, 2006 11:40 am

My 2 cents:

http://www.google.com/search?q=SSH+tunnels
and
Entunnel from http://www.vandyke.com. It easy in use. Its development has ceased, but (from their site): "port forwarding (tunneling) functionality that Entunnel provides can be found in SecureCRT, which also provides shell access and terminal emulation".
Vihtor
Contributer
Contributer
 
Posts: 33
Joined: Sat May 27, 2006 1:05 pm
Location: Russia

Postby dama on Tue Jul 25, 2006 4:04 pm

If you're using SSH or Putty, both of them have Tunneling in there options.
Just put in the port you want to use, localhost for the destination, and then connect to your shell as usual. Then you're set. now anything you do with localhost and that port takes effect on the remote machine.
That's all i know about it (I mainly used that for psybnc, so...). Please correct me if i'm wrong.
Cheers!
dama
Regular
Regular
 
Posts: 104
Joined: Wed Jul 05, 2006 6:11 pm
Location: us

Postby tronics on Tue Jul 25, 2006 5:53 pm

I use putty consistently to connect to remote computers. I wasn't aware of the tunneling aspect. So the gist of it is this :

1. Server/machine must be running SSH of some sort?
2. Client should have something simlar to Putty to create the tunnel?

My question is how does the initiating a localhost on the client find it's way to the server?

There must be more setup than what I'm listing above right?

Thanks for the posts.
tronics
Newbie
Newbie
 
Posts: 16
Joined: Tue Jul 25, 2006 9:29 am

Postby gls on Wed Aug 16, 2006 6:10 am

gls
Contributer
Contributer
 
Posts: 28
Joined: Wed Aug 16, 2006 4:30 am
Location: Chicago, IL

Postby alg8662 on Sun Aug 20, 2006 2:30 pm

If you're talking about a dynamic SSH tunnel to prevent local sniffing of your traffic, here's a quick-start I wrote a few months ago...

"To prevent sniffing of your data, you'll want to set up an encrypted "tunnel" to allow you to "sneak out" of an insecure network. This way, your traffic will be sent encrypted through the insecure network to a secure computer, which will access the rest of the internet by proxy for you. You'll use SSH (Secure Shell) to accomplish this.

First, you'll need an OpenSSH server at a secure location (your "house"). To get this for Windows, download it (www.sshwindows.sourceforge.net), install it using all of the default options, then run the following commands at the Command Prompt (replace YOURUSERNAME with your actual Windows username obviously):

cd "C:\Program Files\OpenSSH\bin"
mkgroup -l >> ..\etc\group
mkpasswd -l -u YOURUSERNAME >> ..\etc\passwd
net start opensshd

Now that your SSH server at home is running, you'll need to know the IP address of your house computer or get a Dynamic DNS service from www.dyndns.com.

Now at your computer in the insecure network, download PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/), an SSH client. This will be used to create your encrypted tunnel out of the insecure network. Open PuTTY, and under "Host Name (or IP Address)" type your house computer's IP address or DynDNS name. Under "Port" make sure it says 22. Now look on the left to Connection > SSH, and under "Preferred SSH Protocol Version" choose "2 only". Now under Connection > SSH > Tunnels type 1080 in "Source Port", click "Dynamic", and click "Add". Now go back to Session, and save your Session so you don't have to do all of that again. Now click Open, hit Yes about the fingerprint, login with the username that you used in the "mkpasswd" command above, type your password (it won't show the ****), and hit enter. Now minimize your PuTTY window but leave it running and logged on to your house computer.

Now still on your computer in the insecure network, open Firefox (www.mozilla.com) and click Tools > Options > Connection Settings. Click "Manual Proxy Configuration", and under "SOCKS Host" type localhost and under "Port" type 1080. Make sure "SOCKS v5" is checked. Now click OK a few times. Now in the address bar type about:config , then type proxy under "Filter" then double-click network.proxy.socks_remote_dns to change it to "True". WHEEW!

Finally try to go to www.google.com, and check www.whatismyip.com which should say the IP address of your house computer.

To use this technique with other applications, just configure them to use a SOCKS v5 proxy server located at localhost on port 1080 while PuTTY is running and those communications can be encrypted too. Mozilla Thunderbird and GAIM support this, so you can have secure browsing, email, and chat while on an insecure network!"

Tell me if that gets you anywhere...
alg8662
Contributer
Contributer
 
Posts: 56
Joined: Fri Aug 04, 2006 1:22 pm

Re: Creating an SSH Tunnel

Postby HEXEN on Fri Sep 08, 2006 12:16 pm

google it and if you still have some question pm me. ill help you.
HEXEN
Newbie
Newbie
 
Posts: 19
Joined: Fri Sep 08, 2006 11:23 am


Return to Technology

Who is online

Users browsing this forum: No registered users and 2 guests

cron