how to create authorized keys

July 23, 2013 3k views
I'm following along with this tutorial 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 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
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.
Have another answer? Share your knowledge.