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 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

1 Answer 1

up vote 5 down vote accepted

install ssh

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

$ which ssh
/usr/bin/ssh
$ which sshd
/usr/sbin/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 74.125.224.51). If it is public, you have it easy. Anyone can try and connect with a command like ssh bob@74.125.224.51.

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 http://whatismyip.org/ to get your public ip address, and anyone who has it can try and connect with a command like ssh bob@74.125.224.51.

get a permanent address

Sign up with http://dyndns.com/ 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 at 23:03

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.