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

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.