If you’ve ever added a
ProxyCommand directive to your
ssh config file, sometimes you might be on a portable computer only need that directive sometimes. Other times you might be behind that nasty corporate firewall or on the network with the proxy server? Since the
ProxyCommand configuration item can be just about anything you like, as long as it reads from standard-input and writes to standard-output, we can use that fact and write a wrapper around to only invoke a proxy connection when needed. I’ve written such a script and use it regularly to tunnel through HTTP Proxy servers or to jump through intermediate hosts.
Can’t use SSH on the standard port 22? Need to tunnel through a proxy server? Work behind a draconian firewall and can’t SSH directly? No problem. This document will hopefully show you how to tunnel through an http-proxy server without any server-side modifications.