I have Ubuntu desktop 16.04 with almost default setup. I'm curious is it possible for someone from outside to connect to my machine via ssh? I don't have any other machines in my network so I can't check it by opening ssh session.

If it is possible I'd like to disable the access to stay more secure.

Q: How do I check the status of SSH access in mys system? How can I disable the access? If it is not possible what is the best way of protecting a machine?

I'm currently looking onto google-authenticator.


Here is the output of the systemctl status sshd

$ systemctl status sshd
● sshd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
  • Please run systemctl status sshd Dec 11, 2017 at 21:13

2 Answers 2


Does Ubuntu desktop enable remote SSH access by default

No, all services are "opt in". You need set ssh up before you can use it. And that would be to install a server version for ssh. When you install the server though you "opt in" by default.

How do I check the status of SSH access in mys system?

16.04 with systemd: systemctl status sshd. In case your system uses upstart, check in this file exists: /etc/init/ssh.conf.

How can I disable the access?

You can always purge the ssh package when it is installed. If enabled stopping and disable-ing the service is possible too.

systemctl disable sshd

In case your system uses upstart: sudo mv /etc/init/ssh.conf /etc/init/ssh.conf.disabled

  • Thank you. I update the question with the out put of the systemctl status sshd. Is it how it supposed to be in case when ssh is disabled? No such file or directory warns a bit. Dec 11, 2017 at 21:27
  • "No such file" truly means no such file, that is, that you don't have the sshd service installed.
    – AlexP
    Dec 11, 2017 at 21:37

No ssh isn't installed by default. By default, your (desktop) system will have no SSH service enabled, which means you won't be able to connect to it remotely using SSH protocol (TCP port 22). This makes installing SSH server one of the first post-install steps on your brand new Ubuntu. The most common SSH implementation is OpenSSH.

To check in case your not sure, run this from your terminal:

systemctl status sshd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .