Hello there. I need to add a public ssh key (from codeship.io) to my Ubuntu 12.04 machine. I have added the key to ~/.ssh/authorized_keys/id_rsa.pub and after that restarted ssh (sudo service ssh restart). However. I’m still not able to log into the server from codeship, so I’d like to know if the public key has been installed correctly. Is there a way to verify it?
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!
You don’t need to copy <pre>~/.ssh/authorized_keys/id_rsa.pub</pre> itself to the server. You need to copy its contents into the file <pre>~/.ssh/authorized_keys </pre> on the server. That file can contain multiple public keys that you have authorized to access your server. <br> <br>Check out this article for all the info: <br> <br>https://digitalocean.com/community/articles/how-to-set-up-ssh-keys--2 <br> <br>To make a long story short, you could do it like so: <br> <br><pre> <br>cat ~/.ssh/id_rsa.pub | ssh user@123.45.56.78 “cat >> ~/.ssh/authorized_keys” <br></pre>
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.