I'm having a problem accessing SSH on my Ubuntu server from outside the network.

Accessing it using it's local IP address ( works fine. Accessing from a networked PC but using the routers external IP address also works fine. The problem arises when I try to access the server from my work PC.

I had to do a bit of port forwarding as my work firewall will only allow outbound traffic on ports 80 and 443. My router will now accept connections on 443 and forward them to port 22 on my Ubuntu server and this configuration works fine in the above tests using the external IP address. However, at work I can still not connect (I'm using Putty by the way) and just get a "Server Unexpectedly Closed Network Connection" dialog.

Checking the ssh logs (auth.log) last night I can see entries which relate to my works external IP address so I know that the request was getting to the server itself but I can't find any real explanation for the error itself which reads:

Did not receive identification string from xx.xx.xx.xx << Work IP Was Here

Can anyone clarify what this means and what I need to do to resolve the problem. The SSH configuration is pretty basic and really limited to disabling root access.

Thanks in Advance


It means that the SSH client didn't actually speak SSH to the server. My best guess would be some sort of transparent proxy or IDS getting in the way of your traffic at work and mangling it beyond all hope of recovery. If so, install OpenVPN on 443/tcp at home, and explicitly configure the OpenVPN client to use the HTTPS proxy to connect to home (works great -- got me full 'net access from inside a stupendously locked-down government network once).

  • Looks like this is the problem. I jumped onto a friends WiFi with my laptop (to keep all other variables the same) and was able to connect without any problems. Looks like my packets are being corrupted on-route but only via the work systems (some of which is handled by a third-party) – DilbertDave Aug 20 '09 at 7:50

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.