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?

  • 1
    Is the PC attached directly to the Internet or is it behind a router? – stedotmartin Oct 26 '11 at 12:39
  • 1
    @StephenMartin: It is behind a router. – petrichor Oct 26 '11 at 12:42
up vote 29 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:

ssh USERNAME@IPADDRESS

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

Get a free account on dyndns.com 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 portforward.com for your specific router.

  • 1
    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 dyn.com. The full link is here dyn.com/dns/dyndns-free) – 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
  • dyn.com no longer seems to be free – kennyB Apr 20 at 21:52

You could get a hostname via a service like http://www.noip.com/ and then setup a ssh server. you would then connect via e.g.

ssh USERNAME@HOSTNAME.no-ip.biz

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 https://opengateway.googlecode.com/files/robotito 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.

  • Is this your blog? You should say that in your answer. – fossfreedom Aug 29 '13 at 10:31

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.

Installing and using ssh is easy. You can install it from here: https://apps.ubuntu.com/cat/applications/oneiric/openssh-server/.

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 dyndns.org 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.

check out this link:

http://www.raspberryanywhere.com/

Perhaps it can be of some help. I'v been using the service from several weeks and it works great!

The link provide a simple software teamviewer like to access your raspberry board anywhere you are. Furthermore, you can use your usual SSH client; they just provide a virtual address to connect to your board via SSH or HTTP . It worths a try for sure!

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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