生成SSH Key

作者: 比德鲁滨逊 | 来源:发表于2020-04-21 11:58 被阅读0次

使用环境

  • Mac下使用iterm终端
  • Window下使用git bash终端

检查是否有SSH Key

ls -al ~/.ssh

生成新的SSH Key

ssh-keygen -t -b 4096 rsa -C "your_email@example.com"

拷贝内容

pbcopy < ~/.ssh/id_rsa.pub

# 或者使用以下命令,手动复制
cat ~/.ssh/id_rsa.pub

ssh-add

查看ssh-agent中的密钥

ssh-add -l

把专用密钥添加到 ssh-agent 的高速缓存中

ssh-add ~/.ssh/id_rsa
ssh-add ~/.ssh/

从ssh-agent中删除密钥

ssh-add -d ~/.ssh/id_xxx.pub

相关文章

网友评论

    本文标题:生成SSH Key

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