Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 MTS MBlaze USB dongle, with which I can connect to the internet. The question is, how do I set up a ssh connection accessible over the internet so that any one can connect to my PC through that (using valid username/password provided by me of course) ? If not possible, what do I need to make this possible ?

I'm using ubuntu 10.04 - but can upgrade if absolutely required.

share|improve this question
up vote 9 down vote accepted

install ssh

First things first. You need ssh installed. Not just the client, the server too. Find out:

$ which ssh
$ which sshd

If which can't find them, you need to install: sudo apt-get install ssh sshd.

The install process should set up everything, but just in case, make sure the ssh port (22), is open (if ufw is disabled, consider enabling it): sudo ufw allow 22/tcp

what is your address

Type ip addr | grep inet to get your ip address. If it starts with 192.168., 172.16., or 10., you have a local (aka private) ip address. Otherwise it is public (eg If it is public, you have it easy. Anyone can try and connect with a command like ssh bob@

If you are stuck with a local IP address, you need to configure your router to forward port 22 to your computer. Then you can go to a site like to get your public ip address, and anyone who has it can try and connect with a command like ssh bob@

get a permanent address

Sign up with for their free Host Services to link a dyndns name to your ip address. I'm assuming here that you have not bought a static ip address from your ISP.

share|improve this answer
Pretty much nailed it :) – TCSGrad Aug 7 '11 at 6:53
Is openssh-server significantly different from sshd? – hexafraction Oct 7 '12 at 17:25
@hexafraction openssh-server provides an implementation of sshd. it's well-respected, to say the least. – djeikyb Feb 24 '14 at 23:03

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.