I just installed Ubuntu 14.04 on my server and I was setting up all my config files when I came across this in my sshd_config
file:
# Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes
This made me very worried. I thought that it was possible that someone could be logging into my server as root without a password.
I tried connecting to my server as root via:
johns-mbp:~ john$ ssh root@192.168.1.48
The authenticity of host '192.168.1.48 (192.168.1.48)' can't be established.
RSA key fingerprint is 40:7e:28:f1:a8:36:28:da:eb:6f:d2:d0:3f:4b:4b:fe.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.48' (RSA) to the list of known hosts.
root@192.168.1.48's password:
I entered a blank password and it didn't let me in, which was a relief. So my question is: what does without password mean and why is this a default in Ubuntu 14.04?
without-password
means all methods allowed except password? It really sounds like "allowed to login without the need of a password". – Gauthier Sep 12 '14 at 09:09PermitRootLogin now accepts an argument of 'prohibit-password' as a less-ambiguous synonym of 'without-password'.
– endolith Sep 16 '16 at 00:57prohibit-password
prevent a ssh key that has a password from working? – DanCat Apr 02 '17 at 00:44prohibit-password
andwithout-password
don't affect SSH Key Authentication at all - SSH Key passwords are handled client side not over the connection to the server. You can't login to the server with just passwords, is all. – Thomas Ward Mar 22 '18 at 23:16without-password
is now deprecated in favour ofprohibit-password
, starting at least in Ubuntu 20_04. – Timo Jun 07 '21 at 18:23