Question

how to create authorized keys

Posted July 23, 2013 5.3k views
I'm following along with this tutorial http://toroid.org/ams/git-website-howto about how to use git to deploy to a remote server with a simple command like 'git push web.' The article has the following paragraph "I assume that the web site will live on a server to which you have ssh access, and that things are set up so that you can ssh to it without having to type a password (i.e., that your public key is in ~/.ssh/authorized_keys and you are running ssh-agent locally)." In the .ssh directory on my local machine, I have "id_rsa id_rsa.pub key_backup known_hosts" i.e. there is no 'authorized_keys' Can anyone explain how I might create authorized keys for this to work? thanks in advance

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.

×
2 answers
by Etel Sverdlov
SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. With SSH keys, users can log into a server without a password. This tutorial explains how to generate, use, and upload an SSH Key Pair.
Run: ssh-copy-id user@ip - this command will copy your public key into ~/.ssh/authorized_keys

Make sure it works by running: ssh user@ip
If you are not prompted for a password and successfully log in, it works.
Submit an Answer