I'm trying to disable logging in by password on a remote Ubuntu server, so that it's only accessible by using the encrypted key file thingy (I'm not totally clear on the terminology).
I followed these instructions, which seemed clear and straight forward. Everything seems to go without error, but when I test that passwordless login is working, I am just automatically logged in.
In my /etc/ssh/sshd_config
file, I have ensured these are the settings and triple checked them:
RSAAuthentication yes
PubkeyAuthentication yes
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
After I do that, I reload the SSH service (which I assume works, but it doesn't give me any notification). Then I log out, temporarily move my key file (as per instructions) and log in again:
# service ssh reload
# exit
logout
Connection to ###.###.###.### closed.
$ mv ~/.ssh/id_rsa ~/.ssh/id_rsa.backup
$ ssh user@###.###.###.###
Last login: Wed May 9 07:19:47 2012 from place.place.place.tld
#
(#
is my server and $
is my local machine, of course.)
Supposedly, after making the edits to /etc/ssh/sshd_config
, and after moving my ~/.ssh/id_rsa
file, when I log in, I should be refused. But I'm not. I just walk through the front door like I own the place.
Where am I going wrong? How do I ensure that I can only log in by using the key file, and passwords are refused?