Install OpenSSH Server
Secure encrypted access to server console
If you did not install OpenSSH originally during the Ubuntu server installation with Tasksel, then install and configure it with these instructions:
$ sudo apt-get update $ sudo apt-get install openssh-server $ sudo systemctl enable ssh |
Edit the configuration file:
$ sudo nano /etc/ssh/sshd_config |
Modify the settings with the following:
PermitRootLogin prohibit-password MaxAuthTries 10 PasswordAuthentication yes (choose no if you plan on using SSH key only for SSH login) |
Press Ctrl-O to save, Ctrl-X to exit.
Configure Uncomplicated Firewall to allow OpenSSH access:
$ sudo ufw allow in OpenSSH $ sudo ufw allow in 22/tcp |