简单记录下过程 按官方网站提示即可
cd ~/.ssh/
#如果没有证书 生成一个
ssh-keygen -t rsa
[root@萨法是的 .ssh]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
▽
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:------
root@阿萨法撒
The key's randomart image is:
+---[RSA 2048]----+
| |
| |
+----[SHA256]-----+
# 测试
ssh -T gitee.com
!成功了!
官网文档
文档地址
按文档操作 最后
ssh -T git@gitee.com
有报错 所以此处做单独记录