美文网首页
SSH 常规配置

SSH 常规配置

作者: Lingday | 来源:发表于2023-05-31 10:25 被阅读0次


1.创建 公钥

ssh-keygen -t rsa -C ‘xxx@163.com’

注:邮箱随机填写,这是你push的时候会显示

a.会有选择保存地址默认直接enter

b.输入访问密码,建议直接enter 不填

2.查看公钥匙

cat ~/.ssh/id_rsa.pub

注:copy内容,粘贴到你的git  ssh配置中

3.把私钥配置到本地

ssh-agent -s

ssh-add ~/.ssh/id_rsa

4.验证是否配置好

ssh -T git@github.com   

出现以下结果表示配置完美

Hi git用户名! You've successfully authenticated, but GitHub does not provide shell access.

相关文章

网友评论

      本文标题:SSH 常规配置

      本文链接:https://www.haomeiwen.com/subject/cahyedtx.html