How to install OpenSSH server in Ubuntu

OpenSSH server helps you to remotely log in to your computer through a secure encrypted way using Secure Shell(SSH).

It was first developed by Tatu Ylonen and now openSSH is part of OpenBSD operating Systems.

We will guide how to install openSSH server and use it in your system.

How to install the OpenSSH server in Ubuntu?

You just need to follow step by step method to install openssh server in your ubuntu.

First you have to open Ubuntu terminals and pass commands into terminals

Update the repositories

sudo apt-get update
sudo apt-get upgrade

Now install openssh-server package

sudo apt-get install openssh-server

After getting install you need to check whether ssh is running

sudo systemctl status ssh
 install OpenSSH server in Ubuntu : check status
Status of SSH

If status is not running then enable the ssh server

sudo systemctl enable ssh

Then start the ssh service by passing command

sudo systemctl start ssh

Installation is completed now you can test logging through connecting remote ssh server from you MS-Windows putty,mac-os, Linux, or any ssh client.

ssh username@servername
ssh [email protected]
 install OpenSSH server in Ubuntu:
Login through ssh
Login through ssh

You have to even open port no 22 for ssh

If a port 22 is closed then connection will get reject.To prevent this you have to enable through ufw

Read this: How to make advanced Configuration in the UFW firewall?

Open Terminals and type few commands

Check ufw firewall is enable or disable

sudo ufw status

If it is enabled check the ssh port is not block, in case of disable or block then pass this commnad

sudo ufw allow ssh

After this enable ufw if it is disable

sudo ufw enable

Now check the status wheter ssh or port no 22 is allow

sudo ufw status
UFW firewall status
UFW status

Now you are ready to use.

Conclusion

In few step you are ready to use OpenSSH server,just make sure that ssh port is enable in UFW Firewall.

There are many options in ssh, if you want to know more about the ssh server how we can use ssh in full-fledged then comment it.

If you want to connect through passwordless that also you can do for that you have to make ssh key

After that you can login without passing password to system every time..

For this part i’ll make a dedicated article very soon.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments