Secure Shell (SSH) is a popular network protocol used for remote login and file sharing between your computer (the client) and the service (the server). It works on various operating systems, including Ubuntu Linux. So if you have a great desktop running Ubuntu or a great Linux laptop and want to use SSH, all you need to do is fire up a terminal and run a few commands. We'll walk you through the process here.
How to enable SSH on Ubuntu
By default, Ubuntu can use SSH to connect to other devices, but to use the same protocol to connect to your Ubuntu installation, we need to get the SSH server up and running. To install and run the SSH server on Ubuntu, you will need sudo privileges, network connectivity, and access to the terminal. Once you've confirmed that you have all three, you can begin the steps below.
- Open terminal.
- Update your Repository:
sudo apt update
- Enter your password.
- Install OpenSSH:
sudo apt install openssh-server -y
- Enter your password.
- The SSH server will start automatically. You can confirm the execution with the command:
sudo systemctl status ssh
- If the SSH server is not running, enter the following command to allow SSH through the firewall:
sudo ufw allow ssh
How to connect to Ubuntu via SSH
Once SSH is installed on your Ubuntu installation, you can use the protocol to connect to the system on another device. All you need is the IP address and credentials to log in.
- Find your IP address:
ip a
- Connect with the Ubuntu system with SSH (replace USER and IP_ADDRESS):
ssh USER@IP_ADDRESS
- Do you agree to the authenticity notice:
yes
- Enter the password for the selected Ubuntu account.
We hope you found this guide helpful, but remember that Ubuntu in general is quite developer friendly. Besides SSH, you can also use other applications on Ubuntu like Java and even MySQL. It really is a great open source operating system and can do so much for you. But if you are not familiar, you can read our guide to Ubuntu to learn more.