Thursday, May 6, 2021

Simple guide to install SSH on Ubuntu

Simple guide to install SSH on Ubuntu

 SSH is one of the most widely used methods to access Linux & Unix servers. SSH provides an encrypted method to access & communicate between servers over insecure networks. In  technical term, it’s a cryptographic protocol that allows for secured, encrypted communication between a host & a client.

In most of the Linux distributions, SSH comes installed & we can access those servers using ssh command but with Ubuntu Desktop (& based distros) that is not the case. We are required to install SSH on Ubuntu to be able access it.

Though we have an ssh client available on Ubuntu, it’s the ssh server that we need to install on Ubuntu. It means we can access other servers from Ubuntu using ssh but other machines will not be able to access our Ubuntu systems.

Install SSH on Ubuntu

SSH server is available with default Ubuntu repositories & we are not required to add any other repos to install it. We only need to run the following command to install it,

$ sudo apt update && sudo apt install openssh-server

Once installed, the ssh server will start on it’s own, but it required we can start it using the following command,

$ sudo systemctl start ssh

Check status with,

$ sudo systemctl status ssh

 Note: If you have your firewall enabled on your Ubuntu system, then you would also be required to enable the ssh connections through the firewall. Run the following command to do so,

$ sudo ufw allow ssh

We can now access our Ubuntu system from other servers. Just open a ssh client & run the ssh command to access it,

$ ssh user@IP_ADDRESS


No comments: