lvxianchao / notes

狗屁不通瞎写的博客
https://coderlxc.com
1 stars 0 forks source link

解决 Github 报错: kex_exchange_identification: Connection closed by remote host #59

Closed lvxianchao closed 10 months ago

lvxianchao commented 1 year ago
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

生成:ssh-keygen -t ed25519 -C "备注tliy"

~/.ssh/config 里新增:

Host github.com
    HostName ssh.github.com
    User git
    Port 443

验证:ssh -T git@github.com

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 key is not known by any other names
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 lvxianchao! You've successfully authenticated, but GitHub does not provide shell access.