I'm trying to reach my ssh server (i'm behind a corporate proxy) so I tried to use Corkscrew. My ssh server is listening on port 443, I put sshd: ALL in my /etc/hosts.allow and there's nothing into my /etc/hosts.deny.

I'm using the following command to launch a ssh session over Corkscrew :

ssh -D991 -p443 user@ssh_server_ip -o"ProxyCommand corkscrew proxy_ip proxy_port %h %p proxy_username proxy_password"

But I get the following error : ssh_exchange_identification: Connection closed by remote host

I had the same issue when I was trying to use httptunnel (hts) and I wasn't behind a proxy (it was at home for tests).

How can I fix that?

  • Have you confirmed that you can connect to plaintext services? Check that you can reach simple TCP sockets before trying SSH. Could it also be that your corporate proxy is messing up the sent information? – Martin Eve Apr 9 '14 at 10:16

Instead of using the -o option, I've edited my ssh config with the following lines:

Host Port 443 ProxyCommand corkscrew ip port %h %p loginpassfile

Corkscrew doesn't work when I directly specify the user and the password but it works when I use a password-file. So problem solved but I don't really know why.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.