ubuntu设置github-ssh
1. ssh-keygen -t ed25519 -f ~/.ssh/ed25519_filename
2. 将 ~/.ssh/ed25519_filename.pub 文件内容添加到github->user->profile->ssh->add
3. 配置 .ssh/config 根据不同host选择指定ssh-key
Host github.com
HostName github.com
AddKeysToAgent yes
IdentityFile ~/.ssh/ed25519/id_ed25519
Host gitee.com
HostName gitee.com
AddKeysToAgent yes
IdentityFile ~/.ssh/rsa/id_rsa
4. eval "$(ssh-agent)"
5. ssh-add -l
6. ssh-add ~/.ssh/rsa(rsa私钥文件)
7. cat ~/.ssh/ed25519/id_25519.pub
8. 将 id_25519.pub公钥文件的内容复制到 github.com ->self->settings-> ssh ->add
9. ssh -T git@ssh.github.com
--> Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.