How can I access a remote machine via SSH from behind a proxy?
You may need tunneling technique for accessing an HTTP proxy using SSH tunneling check this link: http://kimmo.suominen.com/docs/proxy-through-ssh/