2

I set up a SSH server on my Ubuntu on my laptop by OpenSSH. While ssh localhost is okay, I try to first ssh to another computer from, and then from there ssh back to my laptop with its external IP address but it fails with "connect to host xxx port xxx: Connection timed out". My laptop is wirelessly connected to the internet through a router with Comcast as the provider. So I guess I am having a dynamic IP? What is the correct way for setup or connection? Thanks and regards!

migrated from stackoverflow.com Aug 17 '09 at 6:15

This question came from our site for professional and enthusiast programmers.

2

If the IP reported by ifconfig is in the range

10.0.0.0 - 10.255.255.255

172.16.0.0 - 172.31.255.255

192.168.0.0 - 192.168.255.255

You will need to configure your router to forward port 22 to this address. SSH should still work from other machines on your wireless lan.

2

As the answer above states, if you're on a wireless LAN, you're probably stuck behind a NAT (network address translation) firewall. You need to go to your wireless router's configuration page (usually http://192.168.0.1) and tell it to forward connections on port 22 to your laptop.

  • And while you're at it, set an admin password so your neighbors can't reconfigure your router. – ysth Aug 17 '09 at 4:52

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.