I am in a network which has only a http server to access the internet. I want to connect to my server via ssh.

If I try to establish a ssh connection anyway:

ssh myserver -p 1234

I get a blinking cursor. The log on my server doesn't show a connection attempt.

So my first idea was to use corkscrew to tunnel the ssh traffic through http. But if I setup corkscrew as my ProxyCommand and try to connect it fails too:

ssh myserver -p 1234

Proxy could not open connnection to myserver:  Tunnel or SSL Forbidden
ssh_exchange_identification: Connection closed by remote host

The server logs didn't show any connection attempt either. So I thought maybe the proxy blocks all traffic that doesn't go through port 80 or 443. I changed my servers ssh port to 443. I still couldn't connect, but one of the error messages disappeared:

ssh myserver -p 443  

ssh_exchange_identification: Connection closed by remote host

The server logs, again, didn't show a connection attempt. The last thing I tried was using corkscrew manually:

corkscrew myproxy 8080 myserver 443

SSH-2.0-OpenSSH_6.7p1 Raspbian-5+deb8u3

This gets me the ssh servers version string. But after that nothing else happens. The ssh client just seems to hang. The server logs meanwhile show this message:

Did not receive identification string from 1.2.3.4

So it seems to be able to establish a connection. I suspect that the client is able to initially connect to the server and the server replies with it's version string. But when the client tries to answer it gets intercepted by the proxy.

But at this point I'm out of ideas what else I could try.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.