I am trying to login to my Ubuntu 12.10 desktop remotely. I have the SSH server installed and it works fine when I am on the same network as the Ubuntu desktop. However, I am unable to connect remotely from anywhere. This is my first time setting up my own SSH server.

  • By remotely I assume you mean from the web? First off you would either need to know what the external facing IP is of the Ubuntu server and you would need to forward all SSH traffic on whatever port you are connecting from and listening to, (Usually port 22), to the Ubuntu machine on your router. \ Bear in mind most ISP's set up dynamic IP's for most non-business users so your IP can and will change. You would either need to speak to them about a static IP, or constantly check your IP before SSH'ing in. Apr 4 '13 at 1:12
  • Yes, I do mean from the web.
    – Zeeshan
    Apr 4 '13 at 1:28

Here is what I do,

  1. Set up port forwarding on your router, you really don't need to change the ssh port on the ubuntu box, just forward port X from the router to port 22 on the box.
  2. Set up dynamic dns on your router if possible. It will allow you to type "ssh my-username@mybox.here.com:port" Look here for basics on dynamic dns.

You will need to forward the port in your router.

go here http://www.canyouseeme.org/ port 22 is the default for ssh. Though I recommend changing it for security sake.

If this can "see" 22 then it is setup for internet connection. You may also need to set an iptables rule.

  • It does successfully see port 22. Which ip address am I supposed to use to connect remotely? The one I got from ifconfig or the one from canyouseeme.org. I just used the one from canyouseeme.org and it connected from a computer that is not on the same network.
    – Zeeshan
    Apr 4 '13 at 1:17

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.