How To Install SSH Server On Ubuntu 14.04

SSH Server Ubuntu 14.04

0 55

In order to remote Ubuntu system you should install SSH or Secure Shell on the system. Ubuntu has its own SSH tool, it is called OpenSSH. In this article, we will going to learn how to install ssh server on Ubuntu 14.04 and configure it.


What is OpenSSH?

OpenSSH is one of the Secure Shell (SSH) protocol family of tools for remotely controlling, or transferring files between computers. OpenSSH provides a server daemon and client tools to help secure, file transfer operations and encrypted remote control.


ReadHow To Setup Timezone And NTP On Ubuntu 16.04


Install SSH Server on Ubuntu 14.04

First you should update your repository :

apt-get update

apt-get upgrade

Install OpenSSH server package :

sudo apt-get install openssh-server


Configure SSH Server on Ubuntu 14.04

After the installation of OpenSSH is finished, you should backup the original setting of SSH Server on the file /etc/ssh/sshd_config :

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup

And then change the permission of the file :

sudo chmod a-w /etc/ssh/sshd_config.backup

Now edit the file configuration of SSH server with this command :

sudo nano /etc/ssh/sshd_config

sudo vi /etc/ssh/sshd_config

Edit the port number that used by SSH. By default it is 22. But you can change to 2222 or whatever number that you want as long as you remember :

Port 22 to

Port 2222

 If you want to display a banner when login, you can just add or modify the line:

Banner /etc/

You also can modify the content in the file /etc/

For the security reason, you should disable root to login directly wih SSH. Simply modify the line :

PermitRootLogin yes to

PermitRootLogin no


ReadFor The Next Release, Ubuntu Stop Offering 32-Bit ISO Images


Because you already disable root login, now you should your user account or other users to access the system remotely by adding to file /etc/ssh/sshd_config :

AllowUsers userA userB

Don’t forget to replace userA and userB with your actual usernames.

Now save the ssh configuration file and then restart the ssh service to take effect with this command:

sudo service ssh restart or

sudo systemctl restart sshd.service

Finally, now the ssh server is installed on your Ubuntu machine.



You might also like More from author