1.生成ssh密钥
ssh-keygen -t rsa -C "邮箱"
选择保存位置,生成
打开生成的id_rsa.pub 文件,复制里边的全部内容,格式如下
ssh-rsa AAAAB3NzaC1yc2EAy9/ZcYqwd7KN0Dy2/sTpodE4CF2msRfDYOuK2AEi3ZYB8OatFZEMgvCKUWCuehTG12Dn3BzJRQwnlH4BjFpTHVtlWkkb98kNxh+DuF1IJInRK1ZBtObgob8qrkekswW3zYV5Mlxh7HHNTA4nJr4ohwxNXk7+QCfQqBkGa86sQNbdv1LFdKop+Uiy3dC/7cTdTSmr/i/fwuvPxlRfj09U9yKQTtJKKUfSrCr9itoJYyDM00w30pNLqcstuJwqWI63TWw/OvnS8I/r7klXoLWqQlDN2lRMRsr2wBEwTs644D5IYjLr1/W6JKiwmX5+O4j9ZTDn2Ns5hDMRkyQxv4/k53tpyQffvU= [email protected]
2.在github账户中添加公钥
找到setting - ssh keys 添加复制的公钥,保存
3.验证ssh连接
$ ssh -T [email protected]
标签:github,GitHub,rsa,公钥,ssh,com,连接 From: https://www.cnblogs.com/fdbwymz/p/16625558.html