Wednesday, April 27, 2011

How to Tunnel SSH via HTTP Proxy

I have to access ssh server but there is http proxy when I want to go to internet. How can I tunnel ssh via http proxy? Here are the way to do it:

# Download corkscrew. It is easy tool for tunneling SSH through HTTP proxies

# Extract corkscrew then configure and install it
tar -xzvf corkscrew.tar.gz
cd corkscrew
make install
# Create ~/.ssh/proxyauth file and set authentication for http proxy server
# Open ~/.ssh/config file. Add proxy server ip address and its authentication in proxyauth file like this:
Host *
ProxyCommand corkscrew proxy_ip_address proxy_port %h %p ~/.ssh/proxyauth
# Try to access your server via ssh
And it's all done. Enjoy!


Anonymous said...

Thanx for this howto ;-)

Stu said...

yeah, you're welcome :)