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.
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
Open the file
Add this line..
ProxyCommand /usr/local/bin/corkscrew <proxy_server_ip> <proxy_server_port> %h %p
ProxyCommand /usr/local/bin/corkscrew 192.168.1.15 80 %h %p
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.