Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 and I am a noob at it. Thanks in advance!

share|improve this question
    
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. –  Adam Heathcote Apr 4 '13 at 1:12
    
Yes, I do mean from the web. –  Zeeshan Apr 4 '13 at 1:28

2 Answers 2

up vote 3 down vote accepted

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 [email protected]:port" Look here for basics on dynamic dns.
share|improve this answer

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.