Question

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?

-----BEGIN RSA PRIVATE KEY-----

-----END RSA PRIVATE KEY-----

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

Thanks, Michael

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi @nexusguy59,

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

cat ~/.ssh/id_rsa.pub

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

Regards, Kalin