howto get ssh working with a proxy.

I had to do this today and I found a nice little utility to help out. So I’ll share it here.

first the config in your home dir there should be a .ssh dir and a file which stored your saved passphrases, in there create a file call config so you will have (~/.ssh/config) overthere you should add some directives, the format of the file is simple first a Host directive then a set of directives that apply to that host, then the next host.

Second you need a nice little utility call “connect-proxy” you can get it here. Or use your favorite package manager

sudo apt-get install connect-proxy

then just add the following to ~/ssh/config

# file://~/.ssh/config
# not using proxy on lan
Host 192.*
ProxyCommand connect-proxy %h %p
# mandatory to access the internet
Host *
ProxyCommand connect-proxy -H <yourProxy:post> %h %p

that means for your local network (192.*) don’t use a proxy for everything else go use the one in -H

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment