when i enter ssh root@your_droplet_ip all i get is Permission denied (publickey) can anyone help with this?

root@ubuntu-s-2vcpu-4gb-lon1-01:~# ssh root@17*...*** Permission denied (publickey).

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

eval `ssh-agent`

ssh-add ~/.ssh/id_rsa

I am assuming your key file is name id_rsa

root@ubuntu-s-2vcpu-4gb-lon1-01:~# ssh-agent

SSH_AUTH_SOCK=/tmp/ssh-gsyd8lctjfdv/agent.12627; export SSH_AUTH_SOCK; SSH_AGENT_PID=12628; export SSH_AGENT_PID; echo Agent pid 12628;

root@ubuntu-s-2vcpu-4gb-lon1-01:~# ssh-add ~/.ssh/id_rsa

Could not open a connection to your authentication agent.


root@ubuntu-s-2vcpu-4gb-lon1-01:~# eval ssh-agent Agent pid 1666 root@ubuntu-s-2vcpu-4gb-lon1-01:~# ssh-add ~/.ssh/id_rsa /root/.ssh/id_rsa: No such file or directory

that’s what I get back