I created a user with root privileges, but when I try to log in as root, I get the following error: Server refused public-key signature accepting despite key. And the server asked me for a password, but I have no password because I should access through ssh key.
But if I go to the server with the user I created with root privileges, it works well with ssh keys. I use the same key for both root ssh to the new user. I generated the key with PuTTYgen.
I use Nginx.
How can I solve that?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Since you appear to have a user you can access, look at the actual error in /var/log/auth.log.
Assuming a default install, if you can’t log in via SSH pubkey authentication, it’s generally because of a lacking ~/.ssh/authorized_keys file, the wrong key being set in that file, or bad permissions on that file or its containing directory. Giving the wrong key from your client can also lead to issues.
On the client side, you can use ssh -vv (or find a way in Putty to enable additional logging) to verify what’s going on.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.