How to lock down Ubuntu linux so that only the active user can log in
I am new to linux and interested in only allow in login via direct access to the machine (active user). I don’t even want to be able to log in remotely myself. Can someone please point me in the right direction on how to do this? I am using Ubuntu.
By default, Ubuntu doesn’t allow anyone to log in remotely – you’d need to install a server for that (for example, for an SSH server, the openssh-server
package), and then activate it.
So, unless you’re explicitly doing that, nobody can log in remotely.
If you already did install such a server, you can either uninstall it (sudo apt remove {name of the server package}
, or just disable it (sudo systemctl disable --now {name of the service}
, for example sudo systemctl disable --now sshd
). But again, this will not be necessary unless you specifically set up a server first.