I am trying to configure an ssh
server, so that it accepts only keys (so disabling the request of the password).
I have already generated the public and private key using PuTTY (under Windows). I have two users currently, root and amministratore. I don't want root to be able to login using ssh, only amministratore can.
What I've modified and done until now is:
/etc/ssh/sshd_config
– see https://pastebin.com/hp0EQ5hGroot@autoapi:~# ls -ld ~/.ssh drwx------ 2 amministratore amministratore 4096 May 5 16:22 /home/amministratore/.ssh
amministratore@autoapi:~/.ssh$ ls -l total 4 -rw-r--r-- 1 amministratore amministratore 398 May 5 16:08 authorized_keys
root@autoapi:~/.ssh# ls authorized_keys
I HAVE REMOVED CHARS IN THE MIDDLE, OBVIOUSLY.
root@autoapi:~/.ssh# cat authorized_keys ssh-rsa AAAA.....KKQ== rsa-key-20190504
What have I forgotten?
/etc/ssh/sshd_config
in question. And what is going wrong?ls -ld ~/.ssh
when in~root
./root
?), but the output is for/home/amministratore
. (2) What is your problem? Is root ssh login succeeding? Isamministratore
not working? Please do not respond in comments; edit your question to make it clearer and more complete.