For Ubuntu beginners, this quick tutorial will show you how to enable the secure shell (SSH) service in Ubuntu 18.04 LTS.
Ubuntu ships with OpenSSH, OpenBSD Secure Shell, in its main archives for secure access from remote machines. It is a suite of security-related network-level utilities based on the SSH protocol.
Install OpenSSH Server in Ubuntu 18.04:
1. Open terminal either via Ctrl+Alt+T keyboard shortcuts or by searching for “terminal” from software launcher.
2. When terminal opens, run command to install OpenSSH service:
sudo apt-get install openssh-server
Input your password (no visual feedback while typing) when it prompts and hit Enter.
3. Once installed, SSH starts automatically in background. And you can check its status via command:
sudo systemctl status ssh.service
To change SSH setting, e.g., listening port, root access, run command:
sudo gedit /etc/ssh/sshd_config
The command opens the configuration file via Gedit (For Ubuntu Server you may use nano instead).
And remember to restart SSH service to apply changes:
sudo systemctl restart ssh.service