0

I installed openssh-server. I am able to ssh into the server via my ehternet local network, I can ssh from the local host. I have set up port forwarding on my router. I have run 'sudo ufw allow 22/tcp' to ensure my port 22 is open.

But everytime I try to connect remotely, i.e. ssh my_server_ip, I get the error: connect to host my_server_ip port 22: Operation timed out

I have no idea how to fix this.

When I use a port scanning service online my port 22 is open, and I have told the router to do port forwarding to the server for port 22.

  • 1
    Are you connecting from the same LAN that the server is on but using your outside IP? Or are you remote from the network, Some routers have a problem with the former. – 0x7c0 Jun 8 '14 at 22:35
  • OMG!. It was the former. Just used 3G connection and tried again. Worked first time! Thanks so much, spent way too many hours trying to make that work. – Will Beauchamp Jun 8 '14 at 22:44
  • Okay I added it as an answer. – 0x7c0 Jun 8 '14 at 22:49
1

Some routers have a problem traversing NAT when trying to connect to a server, using its external IP, but on the same LAN. It should work just fine from an outside network.

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.