1. The workplace proxy (from here workproxy) is on port 8080; it requires NTLM authentication. I've been able to achieve this using NTLMAPS. I've tested NTLMAPS using all of my browsers, and the manual NTLM authentication works fine. The proxy seems to allow some HTTPS (port 443) connections, as I'm able to bank within the country, but not with a foreign bank.

  2. I've setup a home machine (let's call it homesvr), also Windows, to run an SSH server on port 443, everything with regards to the SSH server works. (I'm running it on Cygwin).

  3. On the work machine I have Cygwin, and I'm attempting to SSH to homesvr using the following settings --


Host *
ProxyCommand corkscrew localhost 5865 %h %p /home/WinUser/.SSH/home.auth



SSH -v homesvr -p 443 output is ...

OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /home/WinUser/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh_config
debug1: Executing proxy command: exec corkscrew 5865 homesvr 443 /home/WinUser/.ssh/home.auth
debug1: permanently_drop_suid: 400
debug1: identity file /home/uidb5693/.ssh/id_rsa type -1
debug1: identity file /home/uidb5693/.ssh/id_rsa-cert type -1
debug1: identity file /home/uidb5693/.ssh/id_dsa type -1
debug1: identity file /home/uidb5693/.ssh/id_dsa-cert type -1
debug1: identity file /home/uidb5693/.ssh/id_ecdsa type -1
debug1: identity file /home/uidb5693/.ssh/id_ecdsa-cert type -1


ssh_exchange_identification: Connection closed by remote host

It seems as though the connection is established, but it is not authenticating properly with homesvr and hence timing out on login. Removing the home.auth file from .ssh/config results in the same behavior.

This has frustrated me for nearly a week. Any advice is highly appreciated.

  • 1
    Assuming it doesn't require authentication because you don't get prompted probably isn't a good idea. If you are on a domain at work your browser could be silently passing your NTLM credentials.
    – Zoredache
    May 6, 2011 at 19:32
  • It seems as though you are absolutely right about the NTLM credentials being passed to the workproxy. I've successfully used ntlmaps to authenticate "manually", by running a local proxy (ntlmaps) and passing it my correct plain text credentials. Now instead of receiving the Proxy Authorization Required error, the terminal hangs on the debug message right before that and doesn't give me any chance to enter my password on the SSH server. It seems as though I've done the hard part, I've bypassed the proxy and connected, now I just need to forward the output
    – user80096
    May 6, 2011 at 20:15
  • 3
    Standard disclaimer: you're responsible for the consequences if you get in trouble with your IT department or management for trying to bypass their proxy.
    – nhinkle
    May 7, 2011 at 19:01
  • Check sslh, Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port)
    – Pablo A
    Aug 11, 2023 at 15:52

2 Answers 2


You can do

ssh -D 8888 yourname@serveroutside

if serveroutside listens on 443 do

ssh -D 8888 -p 443 yourname@serveroutside

Then make your browser use socks proxy v5 on localhost port 8888 and you are good to go.


you should try openvpn at homesrv then connect through it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .