How to enable SSH on Ubuntu

url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url

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.

  1. Open terminal.
  2. Update your Repository:
    sudo apt update
  3. Enter your password.
    Sudo apt on Ubuntu

  4. Install OpenSSH:
    sudo apt install openssh-server -y
  5. Enter your password.
    Installing SSH on Ubuntu

  6. The SSH server will start automatically. You can confirm the execution with the command:
    sudo systemctl status ssh
    Confirming SSH is running on Ubuntu

  7. 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.

  1. Find your IP address:
    ip a
  2. Connect with the Ubuntu system with SSH (replace USER and IP_ADDRESS):
    ssh USER@IP_ADDRESS
  3. Do you agree to the authenticity notice:
    yes
  4. 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.


Leave a Comment