How to Enable SSH on Ubuntu 18.04

Secure Shell (SSH) is a cryptographic network protocol for operating network services securely such as login, remote command-line execution, and transfer files securely. To enable SSH server on Ubuntu desktop machine, you need to be logged in as a user with sudo privileges.

SSH server is not installed by default on Ubuntu desktop operating system, So you need to install it from the standard Ubuntu repositories.

We will guide you to install SSH server on your machine in the following steps:

1- Open terminal by pressing Ctrl+Alt+T on the keyboard or by clicking on the terminal icon and type the following commands:

$ sudo apt update
$ sudo apt install openssh-server

Enter the password and type y to agree for the installation.

ssh installation

2- After the installation is completed, SSH service will start automatically. However, if you want to verify it is running you can type the following command in the terminal that will prompt you the status of the service:

$ sudo systemctl status ssh

If it says Active: active (running) so the service is up.

ssh status

press q or Ctrl + c to exit and get back to the prompt.

3- Open SSH server port through Ubuntu firewall(UFW) if it is enabled, using the following command:

$ sudo ufw allow ssh

Now you have SSH server installed and enabled on your Ubuntu machine, you can login to it using any remote SSH client.

Additional commands

If you want to disable SSH, you can stop SSH service by typing:

$ sudo systemctl stop ssh

To start the service again:

$ sudo systemctl start ssh

And if you want to disable the SSH service from starting during system boot:

$ sudo systemctl disable ssh

To re-enable it:

$ sudo systemctl enable ssh

To learn more about configuring your SSH server visit Ubuntu’s OpenSSH Configuring page. Also you may visit the official OpenSSH manual page for more information.

Also, if you want to learn how to setup SSH key-based authentication, check out this article.

We hope you find this article helpful and if you have any question, leave a comment below.


Share


Other articles you may find interesting

Description: Cool glowing animated frame, can be used to indicate activation or as click ripple effect Dependencies: None Mobile support:…
Read More
Description: Animated dot spinning around a word that can be used as animated logo or as a loader. Dependencies: None…
Read More
Window 10 inspired calender using HTML and CSS
Description: Calendar month view that just resembles Window 10’s calendar appearance and animations. Dependencies: JQuery Mobile support: No License: MIT…
Read More
how to test an ethernet cable
Sometimes you need to test your Ethernet cable either to make sure it is working correctly before setup or to…
Read More
embed material design icons to your website
In this guide your are going to learn how to embed google’s material design icons to your website in simple,…
Read More
managed vs unmanaged switches
In general, network switches are the main building block of wired computer networks. It’s the networking hardware that connects other…
Read More

Advertisment

Leave a Reply

Your email address will not be published. Required fields are marked *