- Run the following command to generate a key.
$ ssh-keygen
You'll be asked to enter passphrase. You can leave that empty.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
A pair of keys (public and private) will now be generated and saved at the location you earlier entered.
Your identification has been saved in /Users/username/.ssh/id_rsa.
Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
The key fingerprint is:
<Your Key Here> your@email.com
- Start the
ssh-agent
:
$ eval `ssh-agent`
Agent pid 59566
add your key to the agent:
ssh-add ~/.ssh/id_rsa