生成密钥文件
$ ssh-keygen -t rsa -f filename -C [email protected]
注意:上述代码中filename是密钥文件名(默认是id_rsa),[email protected]是你在网站(github/gitlab)上注册的邮箱
执行该命令后,会在~/.ssh中生成对应的密钥文件
导入ssh-key
复制*.pub文件内容
$ vi ~/.ssh/*.pub
所有内容都要复制
$ ssh-keygen -t rsa -f filename -C [email protected]
注意:上述代码中filename是密钥文件名(默认是id_rsa),[email protected]是你在网站(github/gitlab)上注册的邮箱
执行该命令后,会在~/.ssh中生成对应的密钥文件
$ vi ~/.ssh/*.pub
所有内容都要复制