How to Enable SSH in Ubuntu 16.x

After fresh installation of Ubuntu, now you have decided to access it on your desktop or laptop using SSH? Ok lets see how to Enable SSH in Ubuntu to allow secure remote login and other network communications.


To enable ssh in ubuntu machine you need to install a package called OpenSSH-Server, which is suite of security-related network-level utilities based on the SSH protocol. It is widely used protocol for remotely controlling, or transferring files between, computers.

1- To install it, open up terminal on your Ubuntu machine and run the following command

broexperts@msrv:~$ sudo apt-get install openssh-server
Install OpenSSH Server Package on Ubuntu
Install OpenSSH Server Package on Ubuntu

2- Once you installed OpenSSH Server package, you may change some settings (e.g., the SSh Listening port, and root login permission) by editing: /etc/ssh/sshd_conf, which is configuration file for OpenSSH Server, there is an other file named ssh_config which is OpenSSH Client file, make sure not to get confuse.

You can edit configuration file via command:

broexperts@msrv:~$ sudo nano /etc/ssh/sshd_config

3- Once you have done your changes and save configuration file, now you need to apply them by restarting ssh server via this command:

broexperts@msrv:~$ sudo systemctl restart sshd

After that, you should have SSH service up and running in your system, you may check the status by running command:

broexperts@msrv:~$ sudo systemctl status sshd
SSH Service Status Check
SSH Service Status Check

If you are facing any difficulty to implement this guide please tell me in comments section box. Thanks

Similar Posts