By jartist77
**I am completely new to DigitalOcean. I have a somehow connected droplet at the first time I have created ssh key. I have given the name id_do_rsa
and id_do_rsa.pub
just because I am having one more set of ssh for bitbucket.
Now after a few days when I am trying to login using ssh root@xxx.xxx.xx.x
it is giving me Permission denied (publickey) error.
In the log using ssh -vvv root@xxx.xxx.xx.x
I think it is using id_rsa
instead of id_do_rsa
...
debug1: Will attempt key: /Users/username/.ssh/id_rsa RSA SHA256:C2lx71R4KU
...
Is there any way to fix it or will I have to create another key?
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!
Accepted Answer
Hi there @jartist77,
What you could do is specify the path to the id_do_rsa
SSH key with the -i
flag. That way you can use your id_do_rsa
SSH key rather than the default one.
The command would look something like this:
ssh -i /path/to/id_do_rsa root@xxx.xxx.xx.x
Let me know how it goes! Regards, Bobby
Hello, I’ve been grappling with this problem for days. Finally found the perfect solution. Had to share. It’s by @grenade at Github. Just clone and follow his file permissions and you’re done. Please make sure you give him a HUGE star!!!
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.