S
S
Shigaev.2019-09-19 07:52:52
ubuntu
Shigaev., 2019-09-19 07:52:52

Where to place authorized_keys for the user?

Hey! Help with entering the server using keys from Putty.
I made the keys for the root, everything works: I go to the server using the key phrase. It doesn’t work with the user - the server refuses his key. You have to go by password. Generated both keys in the same way - both in Putty Key Generator. In the Putty settings, public keys are specified - one for the root and one for the user. Of course, for each of them, Putty has its own Saved Sessions. Seems ok.
Not ok probably with the user's public key. And probably with the paths in my Digital Ocean ubuntu droplet. There the root file authorized_keyslies in /root/.ssh/authorized_keysand, as it turned out, it works. In the user's home directory, there was no folder .sshat all. And where to pick it up - it was not clear. Well, I created it /home/user/.ssh/(rights 700), and in it - the fileauthorized_keys(rights 600). Put the public key in it. It did not work, the server started up only by password. Then I tried to do the same in the folder /etc/.shh/- the key entry did not work either. Also, I tried to put the public key in the root file - /root/.ssh/authorized_keys, in addition, through the line from its key. Did not help.
Where did you mess up?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-09-19
@Shigaev

I forgot to set the rights to 400 on the key itself and the owner is correct?)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question