When copying the ssh key, what to copy in the authorized_keys file?

I am trying this out and I am sorry if this is a stupid question but do I copy this part of the key in to the authorized_keys file?



or Do I just copy the actual key in between those two pieces.

Thanks, Michael

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.

Hi @nexusguy59,

You need to copy your public key not your private one. The public key is located in the following file

cat ~/.ssh/

You need to copy it’s content and paste in your server’s ~/.ssh/authorized_keys file

Regards, Kalin