Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a powerful computer in the lab and I installed Ubuntu 11.10 64-bit on it. I want to install an SSH server on it, so I can reach it from home and even from my Android via ssh. But I haven't got any experience on creating an ssh server.

The machine has a dynamic IP. I don't want any other ssh users, installing it only for myself will be enough for me.

Where should I start? What tools do I need and how would I configure them?

share|improve this question
Is the PC attached directly to the Internet or is it behind a router? – squarebear Oct 26 '11 at 12:39
@StephenMartin: It is behind a router. – petrichor Oct 26 '11 at 12:42
up vote 17 down vote accepted

To get started with ssh in general, install openssh-server.

sudo apt-get install openssh-server

On the next restart, this should start up automatically. To connect to the computer remotely, just enter the following in a remote terminal, substituting the ALL-CAPS names for your own:


Now, to take care of the dynamic ip forcing you to recheck the IP all the time:

Get a free account on and choose the name you want to type when you connect.

Once that is done, install "ddclient" on the server machine. This will automatically update the IP address for you with dyndns.

sudo apt-get install ddclient

When you run it, it will ask you a series of questions, so have your username, password, and the URL you chose earlier ready to type in. It should also automatically add itself to startup.

That should be it. Now when you ssh, just use the URL you chose instead of your IPADDRESS since this should automatically update if the IP changes.

If you have a router, make sure to forward port 22 to your server! There are lots of guides on this at for your specific router.

share|improve this answer
Thanks for the detailed answer. I installed ssh and tried it from another machine in the same domain and it worked. But it didn't work from my Android. I have sent e-mail to our sysadmin if it is possible to let me access my machine outside the domain. So, I couldn't try ddclient yet. (Two Notes: I couldn't upvote since I haven't got 15 reputation. The link of dyndns seems to be changed to The full link is here – petrichor Oct 26 '11 at 13:01
Ah yeah, my bad, fixed in the answer. Hope it works out for you :) – zookalicious Oct 26 '11 at 13:47

You need dynamic DNS client on your PC (or router) and optionally open port 22 on your router to the Ubuntu machine if PC is behind it. Then you can reach your machine via some custom name instead of IP.

share|improve this answer

Installing and using ssh is easy. You can install it from here:

Once it's installed, it'll run and run automatically at boot. All the users on the local machine will be able to use it. You'll still need to fix your network so you can connect to it, but that doesn't really have anything to do with ssh. If it has a public IP, then you can use something like and ddclient to get a dynamic name for it. If it doesn't have a public IP, then you'll also need to configure your network to forward traffic to it.

share|improve this answer

You could get a hostname via a service like and then setup a ssh server. you would then connect via e.g.

share|improve this answer

you can use SSH by using xmmpp / jabber protocol. so you can take access just by google talk on your desktop or mobile phone e.g android. No need IP Public No need special setting Just Install and run as a service. I made a script (tested on my raspian OS in Raspberry Pi) so u can easily install robotito. this is the steps 1. Open Shell Command or u can call it Terminal, go to your home folder, Download installer script by command : wget it will save to you home folder ~ (e.g /home/pi)

  1. after that running the script by entering command : sudo ./robotito

  2. and then you can edit file credentials.rb in config folder if robotito using your gtalk account and save it by pressing ctrl+x and y . Default is using nano editor.

  3. running the robotito in robotito folder by command ./jabbershd start

  4. done you can use now from any google talk client, dont forget to add robotito gtalk account to your google talk account and test it with chatting each other before using the account.

share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – fossfreedom Aug 29 '13 at 10:31
Is this your blog? You should say that in your answer. – fossfreedom Aug 29 '13 at 10:31

Your Answer


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.