How to Install OpenSSH Server on Ubuntu 15.04, 14.04 LTS & 12.04 LTS
Many times openssh server is not installed by default with minimum installation of Ubuntu. This article will help you to install openssh server on Ubuntu 15.04, 14.04 LTS & 12.04 LTS.
- Install OpenSSH Server – Use the following commands to install openssh server on your Ubuntu operating system.
$ sudo apt-get
update$ sudo apt-get installopenssh-server
- OpenSSH Configuration – OpenSSH main configuration file is /etc/ssh/sshd_config. After successful installing OpenSSH server on your system, you may need edit configuration file to make few changes to secure your server.
$ sudo vim /etc/ssh/sshd_config
- Change Default Port – OpenSSH runs on default port 22. We recommend to change SSH port with other port.
- Disable Root Login – By default root user are allowed to ssh from remote clients, For security purpose we recommend to disable direct root access. Use any non root account for ssh and then switch ( su – ) to root account. To do this add “PermitRootLogin no” in ssh configuration file
- Restart OpenSSH – After making all necessary changes restart openssh server using following command
$ sudo service ssh restart