$ cd ~/.ssh
# Checks to see if there is a directory named ".ssh"in your user directory
1.1使用ssh-keygen产生新的key
$ ssh-keygen -t rsa -C "your_email@example.com"# Creates a new ssh key using the provided email
Generating public/private rsa key pair.
Enter file in which to save the key (/home/you/.ssh/id_rsa):
Enter passphrase (emptyfor no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
1.3密匙产生成功
Your identification has been saved in /home/you/.ssh/id_rsa.
Your publickey has been saved in /home/you/.ssh/id_rsa.pub.
The key fingerprint is:
01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com