How To Install SSH Server On Ubuntu 14.04
SSH Server Ubuntu 14.04
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.
Install SSH Server on Ubuntu 14.04
First you should update your repository :
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
If you want to display a banner when login, you can just add or modify the line:
You also can modify the content in the file /etc/issue.net.
For the security reason, you should disable root to login directly wih SSH. Simply modify the line :
PermitRootLogin yes to
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.