This is my first time setting up a server, and need some help using SSH.
My client is PuTTY on Windows 10, server is hosted on an Ubuntu Server 14.04 VM.
I can login to the server using password, but I'd like to transition to key-based authentication. But so far, my efforts have been in vain.
Steps I have taken:
- Using PuTTY, I generated a pair of keys;
- Using PSCP, I transfered the public key to /home/user/.ssh/authorized keys;
Thus the .ssh folder structure is:
total 12
-rw-rw-r-- 1 user user 468 Oct 11 15:58 authorized_keys
-rw------- 1 user user 1675 Oct 11 15:57 id_rsa
-rw-r--r-- 1 user user 393 Oct 11 15:57 id_rsa.pub
- I modified some lines from /etc/ssh/sshd_config:
Full file: http://pastebin.com/EGJDE9vB
Lines I changed:
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
I also tried to uncomment
#AuthorizedKeysFile %h/.ssh/authorized_keys
with no results.
- I restarted the server with sudo service ssh restart. I tried to restart the VM, too.
This doesn't work; I still can authenticate to the server using password only from PuTTY.
Can someone enlighten me? I see the steps above are what are commonly used to disable password, so I am confused.
Thanks in advance.