SSH Proxy and SSH Port Forwarding
- November 11th, 2010
- Posted in Computer . Internet
- Write comment
I found two (rather) nice explanation of
- using SSH as a proxy: http://www.butschek.de/2009/05/ssh-tunnel-proxy/
- and of SSH port forwarding: http://www.symantec.com/connect/articles/ssh-port-forwarding. I did have trouble with authorization here. I was able to solve this by telling SSH specifically to use a certain ID file. That was possible using the
-iswitch.
While those might not be the most straight forwards ones. I found them to contain the information most clearly, when taking a little time to skip over them.
Some hosts seem to have disabled certain forwarding/tunnel options in their /etc/ssh/ssh_config resulting in errors resembling
channel x: open failed: administratively prohibited: open failed
Not much I could do about it as the server was not mine to administer. But there are a lot of Google results coming up how to solve this if you should be a more powerful entity than I am
.
Update: It turned out that, when I tried to establish a SSH tunnel, it was not the hosts fault that I could not establish the SSH tunnel correctly. Rather I was using the -L switch not correctly. I used:
ssh -L 7777:user2@server2:7778 user1@server1
where the user@ was causing the problem. So this worked:
ssh -L 7777:server2:7778 user1@server1
Stuff like directly SSH-ing to server2 is now possible on localhost by doing this:
ssh -p 7777 user2@localhost
Notice the user2@ before localhost. user2 is a user on server2.
See this awesome! (German) article for details and further SSH flags: http://www.planet-metax.de/html/Weblog/SSH-fuer-Fortgeschrittene-I-SSH-Tunnel/
And while we are at it: FoxyProxy is a nice Firefox add-on to work with SSH proxies. Proxy Switchy! is the equivalent for Google Chrome. Yet I was only able to get proxy usage to work with Firefox. But on the other hand, I did not try very hard with Chrome.
No comments yet.