GitHub - SSH

创建ssh公私钥

先看下目录下是否有公私钥

/Users/zhangsan/.ssh

 cd ~/.ssh
 ls
id_rsa                          
id_rsa.pub

生成公私钥

$ ssh-****** -t rsa -b 4096 -C "[email protected]"

回车

Generating public/private rsa key pair.

回车

Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]

回车

Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]

查看
$ cd ~/.ssh $ ls

将公钥的内容复制


配置公私钥

打开github
GitHub - SSH
GitHub - SSH

GitHub - SSH

GitHub - SSH

可以添加多个公钥