-1

I have setup a debian install on a VPS and have successfully implemented key based logins to increase security.

Now I am trying to disable password based logins entirely using the guide found at https://www.digitalocean.com/community/tutorials/initial-server-setup-with-debian-8

I have modified my /etc/ssh/sshd_config file to set the following...

PasswordAuthentication no
PermitRootLogin no
UsePAM no

But on rebooting my server I am still able to login using a username and password.

Anyone have any ideas?

UPDATE Added PasswordAuthentication no to ssh config, after rebooting it is still letting me login with a password though

** UPDATE ** Removed commenting # from the beginning of the line...

#PasswordAuthentication no

All working now!

fightstarr20
  • 207
  • 1
  • 4
  • 12

1 Answers1

3

To disable Password authentication for SSH, you need to set one more value in your /etc/ssh/sshd_config

PasswordAuthentication no

Set that, restart SSH and try again

vxstorm
  • 50
  • 5
  • Thanks for that, what an obvious one to miss! I have added this now though and after a reboot I am still able to login with a username and password. I have updated the OP to reflect this – fightstarr20 Mar 02 '16 at 12:02
  • Glad you figured it out, it's often something simple like a commented line – vxstorm Mar 02 '16 at 12:09