Host github.com User xxx@qq.com Hostname ssh.github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Port 443
然后重新测试,成功
1 2 3 4 5 6 7 8
$ ssh -T git@github.com The authenticity of host '[ssh.github.com]:443 ([20.205.243.160]:443)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This host key is known by the following other names/addresses: ~/.ssh/known_hosts:11: github.com Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '[ssh.github.com]:443' (ED25519) to the list of known hosts. Hi qianj! You've successfully authenticated, but GitHub does not provide shell access.