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.
This tutorial explains how to enable SSH on an Ubuntu machine.
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
.
Enabling SSH on Ubuntu
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
No comments:
Post a Comment