3.2 创建ssh连接

  1. 生成SSH秘钥:

     ssh-keygen -t rsa -C "[email protected]"
     然后加上三个回车
  2. 查看秘钥

     cat ~/.ssh/id_rsa.pub
  3. 在github或gitlab中的对应位置,添加上一步骤复制出来的秘钥保存即可

  4. 然后可以通过ssh连接去测试

     ssh -T [email protected]

    如果返回内容包含successfully,则连接成功,可以开始使用ssh操作啦

Last updated

Was this helpful?