I am trying to disable root password login and only allow root login with a ssh key on debian 7.
cat << EOF >> /etc/ssh/sshd_config
PasswordAuthentication yes
UsePAM no
PermitRootLogin without-password
AllowUsers root test
Port 433
LoginGraceTime 1m
ClientAliveInterval 600
ClientAliveCountMax 0
EOF
service ssh restart
I run these commands as part of a deployment script and yet still I am able to login as root afterwards using the root's password (and not using a ssh key).
I've read quite a few tutorials and I can't seem to see why this is happening.