How to set up ssh connection (acessible over internet, not LAN) using MTS MBLaze modem?

45,190

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. up to 172.31., 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 [email protected].

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 [email protected].

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:
45,190

Related videos on Youtube

TCSGrad
Author by

TCSGrad

Updated on September 18, 2022

Comments

  • TCSGrad
    TCSGrad over 1 year

    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.

  • TCSGrad
    TCSGrad almost 13 years
    Pretty much nailed it :)
  • nanofarad
    nanofarad over 11 years
    Is openssh-server significantly different from sshd?
  • djeikyb
    djeikyb about 10 years
    @hexafraction openssh-server provides an implementation of sshd. it's well-respected, to say the least.
  • cosmicraga
    cosmicraga about 8 years
    "If you are stuck with a local IP address, you need to configure your router to forward port 22 to your computer". How to perform the port forwarding ?
  • djeikyb
    djeikyb about 8 years
    @cosmicraga very much depends on your router. if yours is a popular model, you may be able to ask a question on one of these StackExchange sites