How to Enable SSH in Ubuntu 16.04 LTS

Last updated: April 22, 2016

Enable SSH Ubuntu 16.04

Here’s how to enable Secure Shell (SSH) service in Ubuntu 16.04 Xenial Xerus, the new LTS release, to allow secure remote login and other network communications.

Ubuntu provides OpenSSH (OpenBSD Secure Shell) in its universe repositories, which is a suite of security-related network-level utilities based on the SSH protocol.

1. To install it, open terminal (Ctrl+Alt+T) or log in Ubuntu server and run command:

sudo apt-get install openssh-server

2. After that, you should have SSH service enabled in your system, you may check its status by running command:

sudo service ssh status

3. You may change some settings (e.g., the listening port, and root login permission) by editing the configuration file via command:

sudo nano /etc/ssh/sshd_config

On Ubuntu desktop, you may use gedit instead of nano:

Finally apply the changes by restarting or reloading SSH:

sudo service ssh restart

For more, read the official manual page.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

10 responses to How to Enable SSH in Ubuntu 16.04 LTS

  1. Thank you for your article “How to Enable SSH in Ubuntu 16.04 LTS”. Like you, I have been using Ubuntu for many years; nevertheless, I sometimes need basic instruction. English may not be your native language, but your article is very well written – short, clear, and accurate. Thank you.

    • Ditto to Bill’s comment. I’m no stranger to Ubuntu or linux in general, but I’m not a sysadmin, so well-written and up-to-date articles like these are perfect for getting new boxes rolling.

  2. currently i have install ubutunt 16.04 ,i am able to ping google .and internal network ip . but unable to ping it from our internal network .. when i trace it ..i find OS is blocking it.
    i already check ufw / iptables .. which is disable. open ssh is also installed .but unable to access. how to enable ping .

  3. There is no sshd_config for me, there is an ssh_config but the contents are completely different from what’s shown.

    • sshd_config is the configuration od the ssh server (the daemon is called sshd). ssh_config is the configuration of the client (ssh is the command to use the client). That is why you see the different content.

      The fact that sshd_config is missing it is usually a very good indicator that the ssh server was not actually installed yet.

      Run this (again):
      sudo apt-get install openssh-server

  4. Xiexie ning. Very helpful.

  5. Could you please also explain how to disable it (without uninstalling).

    • service sshd stop will stop it for the time that the server remains booted. If rebooted, it may restart.

  6. Hey Ji m,

    You have posted nice article about ssh.

    Could you please help me . I am facing following error.

    Unable to negotiate with 127.0.0.1 port 8101: no matching cipher found. Their offer: