失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > centos 生成 ssh-key github 连接 配置

centos 生成 ssh-key github 连接 配置

时间:2023-09-29 20:05:05

相关推荐

centos 生成 ssh-key github 连接 配置

我的环境是阿里云centos7。

1、生成ssh-key,填入自己的邮箱

ssh-keygen -t rsa -C "xxxxxx@"

2、进入ssh目录

cd ~/.ssh

3、查看文件

ls

会看到列举出了有id_rsaid_rsa.pub

4、复制一下id_rsa.pub文件内容

cat id_rsa.pub

5、打开github中的SSH and GPS keys选项,新增SSH key,添加完成需要再次输入github密码验证。

6、在自己的终端测试一下吧,使用ssh -T git@

[root@iZuf60c5nb7ulqwzl2jwbsZ .ssh]# ssh -T git@The authenticity of host ' (13.229.188.59)' can't be established.RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.RSA key fingerprint is MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ',13.229.188.59' (RSA) to the list of known hosts.Hi solocao! You've successfully authenticated, but GitHub does not provide shell access.[root@iZuf60c5nb7ulqwzl2jwbsZ .ssh]# ssh -T git@Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.Hi solocao! You've successfully authenticated, but GitHub does not provide shell access.

如果觉得《centos 生成 ssh-key github 连接 配置》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。