This simple tutorial shows how to enable and setup Secure Shell (SSH) service in Ubuntu 24.04, so you can login remotely and transfer files securely in command console.
Debian and Ubuntu use OpenSSH (OpenBSD Secure Shell) to provide secure shell channel for making changes, transferring data, and performing other operations on server from a client remotely.
The SSH service is NOT enabled by default. And, here I’m going to how to enable and configure it in Ubuntu 24.04
This quick tip shows how to enable Secure Shell (SSH) service in Ubuntu 20.04 LTS, both desktop and server, to allow secure remote login and other network communications.
Ubuntu includes OpenSSH, a suite of secure networking utilities based on the Secure Shell protocol, in its main repositories. While OpenSSH client is installed out-of-the-box, you can do following steps to install and setup OpenSSH server in Ubuntu 20.04.
1. First open terminal and run command to install the packages:
sudo apt install ssh
Type user password (no asterisk feedback) for sudo prompt and hit Enter.
2. Once installed, SSH services start in background silently. You can check its status by running command:
systemctl status ssh.service
You may replace status in the code with stop, reload, restart to stop, reload, or restart the service.
3. The SSH service should be working good now for basic use! If you want to change the listening port, root login permission, or other authentications, run command to edit the configuration file:
sudo nano /etc/ssh/sshd_config
replace nano with gedit if you’re on Ubuntu Desktop.
Save changes by pressing Ctrl+X, then Y, and finally hit Enter. And remember to restart the SSH service via sudo systemctl restart ssh.service command.
Here’s how to enable Secure Shell (SSH) service in Ubuntu 16.04 Xenial Xerus, the new LTS release, to allow secure remote login and other network communications.
Ubuntu provides OpenSSH (OpenBSD Secure Shell) in its universe repositories, which is a suite of security-related network-level utilities based on the SSH protocol.
1. To install it, open terminal (Ctrl+Alt+T) or log in Ubuntu server and run command:
sudo apt-get install openssh-server
2. After that, you should have SSH service enabled in your system, you may check its status by running command:
sudo service ssh status
3. You may change some settings (e.g., the listening port, and root login permission) by editing the configuration file via command:
sudo nano /etc/ssh/sshd_config
On Ubuntu desktop, you may use gedit instead of nano:
Finally apply the changes by restarting or reloading SSH: