Ubuntu / Debian: install the SSH server

By default, Ubuntu Desktop comes with a graphical environment (Unity). Other interfaces exist (KDE, Xfce, Mate, etc.) and you can switch from one to the other by installing the packages concerned. But for remote access, nothing better than an SSH session to control the machine from another computer on the network. Not delivered in the original packages, the SSH server installs in seconds and is one of the first things to do for a corporate Ubuntu or small home LAN. The procedure is the same on Debian or other distribution based on it.

Download and activate the SSH server on Ubuntu

1. Open a Terminal (so locally).

2. Update the list of files available in the APT repositories:

sudo apt-get update

3. Install the OpenSSH server:

sudo apt-get install openssh-server

4. That’s all, the SSH server activates automatically. In case, we need to launch a sudo service ssh start.

Connect to Ubuntu by SSH

With OpenSSH Server installed, all you have to do is connect from another computer: Terminal Linux or PuTTY Windows.

1. Indicate the IP address or the name of the machine if the DNS is entered.

2. Leave the port 22 default for SSH.

3. Start the connection with the button ” Open “:

Windows terminal putty SSH tutorial Ubuntu Debian Linux

4. Indicate a login and his password associated:

Windows terminal putty SSH tutorial Ubuntu Debian Linux

5. The SSH connection is established, a welcome message of this type is displayed:
Welcome to Ubuntu 16.04.1 LTS (GNU / Linux 4.4.0-31-generic x86_64)