Friday, 3 May 2019

How to Install OpenSSH in Ubuntu 18.04 using terminal

Objective:
The objective of this article is Installing OpenSSH on Ubuntu 18.04 Bionic Beaver using terminal.
OpenSSH : OpenSSH is the premier connectivity tool for remote login with the SSH protocol.

You'll find more information about OpenSSH at www.openssh.com.

System Details:
  • Operating System: - Ubuntu 18.04 Bionic Beaver
Instructions:
First, make sure that you have not installed the openssh in the system previously.
To check it, execute the following command;

$ sudo systemctl status ssh.service

Image 1 : SSH Status before Installation

If not previously installed then run update command once, and then continue with following command to install OpenSSH , it may ask for permission, press Y to continue;


$ sudo apt-get install openssh-server

Image 2 : OpenSSH Installation
After success, you'll get response as per following image;

Image 3 : Successfull Installation of OpenSSH

After installation, check the status of OpenSSH Server by executing following command;


$ sudo systemctl status ssh.service

After executing above command you'll see the status of OpenSSH Server and the port on which OpenSSH is listening, as marked in following image;

Image 4 : SSH Status after Installation

If you want to change the listening port of OpenSSH Service, you can do so, by editing sshd_config file. You can edit sshd_config file by executing following command;

$ sudo nano /etc/ssh/sshd_config

As you run above command, sshd_config file get open in nano editor, as shown in below image 5,
Image 5 : sshd_config file for OpenSSH

If you are going to change the port of OpenSSH, then don't forget to restart the service by executing following command;

$ sudo systemctl restart ssh.service

----------------------------------------------------------------------------------------------------------------

All done.
Let me know in comment, how it works for you ? 

No comments:

Post a Comment

Thank you for reading post.