SSH through proxy
Problem of the day is I have a computer that is on some local intranet that can not SSH out into the real world. There is however a proxy server on my network that I can configure in my browser to get outside internet access…
But I want ssh. So… after a bit of internet searching and then finally some nagging to a friend who knows this stuff better than I do, we came up with the following:
1. Download connect.c
2. Compile connect.c on your Linux server:
gcc connect.c -o /usr/bin/ssh-proxy-connect
3. Edit /etc/ssh/ssh_config by appending this last line:
ProxyCommand /usr/bin/ssh-proxy-connect -5 -S <proxy-server-goes here>:1080 %h %p
4. SSH normally to where you need to go.
That’s it! Once you get SSH through then anything can happen. Its the ultimate firewall poker. Back doors, etc. You just opened up Pandora’s box.