Do you ever have the situation (say at work using windows) where you would like to connect to a machine over ssh (say at home using Linux/UNIX) but it's not possible because of firewall rules? There might be an http-proxy server available that you could use.
Be aware that applying this trick might be technically possible but not permitted. Probably best to discuss it with someone in your organization first.
Here are the ingredients:
- A windows machine to be used as a client.
- A Linux/UNIX machine to be used as an ssh server.
- Get Putty or Portable Putty to your client.
- Find out what http proxy your organization is using on your client.
- Configure Putty to use that proxy on your client.
Finding out what proxy your organization uses.
There are a few options, going from easy to difficult, you don't have to do each, just one. See what works for you.
- Open Internet Explorer, click Tools Internet Options.... Go to the tab Connections and click LAN Settings.... In the Proxy server. area, you will find the proxy server and the port. If not; continue and try the next trick.
- On your windows machine, open a good website and click Start or whatever, then Run... and enter cmd. You will be presented with a crippled terminal. Type netstat -an and search for ESTABLISHED and 8080 or 3128 on one line, the IP can be found in the third column. Mine looks like this: TCP 192.168.1.2:2210 192.168.1.1:3128 ESTABLISHED. The 192.168.1.1 is my proxy server, 3128 the port.
Configuring Putty to use a proxy.
Now that you have the proxy server and the port, lets configure Putty.
- Open Putty and enter the Host Name where you would like to connect to.
- Open the plus before Connections and select Proxy. Enter the Proxy hostname and Port.
- Now select Open. You should be presented with a password challenge.
Congratulations, you are connected!
Comments
I get the following error
I get the following error when doing step 5:
"Proxy error: 502 Proxy Error (The specified Secure Sockets Layer (SSL) port is not allowed. ISA server is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests)
Some restricted corporate
Some restricted corporate proxies only allow connections on port 80 and 443. So the SSH server may need to listen on one of these ports.
-ryan
Yea but I got it working and
Yea but I got it working and used putty and SSH :)
http://digitalpbk.blogspot.com/2009/05/ssh-proxy-windows-linux-orkut-bypass.html
Thank you.
and some corporate proxies
and some corporate proxies filter even the ssh traffic on port 80 or 443 so only ssh OVER ssl on port 443 work, some times...