How
to Install Open SSH and How to Enable SSH on Ubuntu 20.04?
è Secure
Shell (SSH) is a network protocol used for a secure connection between a client
and a server. Each interaction between the server and a client is encrypted.
è Enabling SSH will allow you to connect to your system remotely and perform administrative tasks. You’ll also be able to securely transfer files via scp and sftp .
è By default, when Ubuntu is first installed, remote access via SSH is not allowed. Enabling SSH on Ubuntu is fairly straightforward.
Perform
the following steps as root or user with sudo privileges to install and enable
SSH on your Ubuntu system:
Open
the terminal with Ctrl+Alt+T and install the openssh-server package:
$sudo apt update
$sudo apt install openssh-server
When
prompted, enter your password and press Enter to continue with the
installation.
Once
the installation is complete, the SSH service will start automatically. You can
verify that SSH is running by typing:
$sudo systemctl status ssh
The
output should tell you that the service is running and enabled to start on
system boot:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-06-01 12:34:00 CEST; 9h ago
...
Press
q to get back to the command line prompt.
Ubuntu
ships with a firewall configuration tool called UFW. If the firewall is enabled
on your system, make sure to open the SSH port:
$sudo ufw allow ssh
That’s
it! You can now connect to your Ubuntu system via SSH from any remote machine.
Linux and macOS systems have SSH clients installed by default. To connect from
a Windows machine, use an SSH client such as PuTTY .
Connecting
to the SSH Server: -
è
There are multiple ways
to connect like Putty, mRemoteNG, MobaXterm or To connect to your Ubuntu
machine over LAN invoke the ssh command.