I always used proxychains to use git/ssh behind a proxy, while this command is really useful, I didn’t like prefixing my every git pull or ssh command with it. A while ago I saw that there is a ProxyCommand Option for ssh configs so I checked it and it seems like a good solution.

Asuming your proxy server is on, you should change your ssh config file (located at ~/.ssh/config) to something like this:

Host bitbucket.org
    ProxyCommand corkscrew 1080 %h %p

After that all your ssh connections to bitbucket.org will go through and whenever using git with an ssh remote to this server it will also use the given setting above.

Note that you need to install corkscrew package for this to work.