Using SSH over a Proxy
Written by BinnyVA on April 9, 2007 – 1:42 am -Back in the days when I was working in a web development company, I had to ssh into some sites for setting up crons, importing database dumps etc. But there was a problem - my system was behind a proxy. And SSH did not have an option to connect through a proxy.
To use ssh over a proxy connection, you need a software called Cocrkscrew. Download the source and compile/install it.
Installation
wget http://www.agroman.net/corkscrew/corkscrew-2.0.tar.gz
tar -xzf corkscrew-2.0.tar.gz
cd corkscrew-2.0
./configure
make
su
[Enter Password]
make install
Configuration
Open the file ~/.ssh/config
Add this line..
ProxyCommand /usr/local/bin/corkscrew <proxy_server_ip> <proxy_server_port> %h %p
Example…
ProxyCommand /usr/local/bin/corkscrew 192.168.1.15 80 %h %p
Here 192.168.1.15 is the proxy server and 80 is the port.
After this is done, just connect to the remote server using ssh.
ssh google.com
Digg it
|
reddit
|
StumbleUpon
Posted in Networking, Tools |


Follow me(@binnyva) on Twitter
January 7th, 2008 at 9:11 am
[...] was a post on LinDesk about how to use SSH over proxy. Thats surely a big issue for people living in developing country. They have to work behind proxy. [...]
September 3rd, 2008 at 12:35 pm
Thank you, works perfect.
Note: If the proxy requires authentication, you have to create a file with the content
:
Make this file readable only by yourself by
chmod a-r
chmod u+r
and then alter the line in ~/.ssh/config to
ProxyCommand /usr/local/bin/corkscrew 192.168.1.15 80 %h %p
(From the corkscrew man page)
September 11th, 2008 at 5:24 pm
Great!!!
Worked perfect.
November 27th, 2008 at 9:54 am
Thanks, worked perfectly!
March 5th, 2009 at 1:02 am
I can’t get it to work. I’m a nub when it comes to using CMD. I can’t get the kode to work. please help me:D
May 19th, 2009 at 7:57 pm
Can you say… awesome!