Ubuntu – Does Ubuntu desktop enable remote SSH access by default

16.04networkingSecurityssh

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.

Edit:

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)

Best Answer

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