ssh -T [email protected] Connection timed out 解决方案-自测有效

ssh -T [email protected] Connection timed out 解决方案-自测有效

$ ssh -T [email protected]
$ ssh -vT [email protected] -p 443
OpenSSH_9.5p1, OpenSSL 3.1.4 24 Oct 2023
debug1: Reading configuration data /c/Users/Administrator/.ssh/config
debug1: /c/Users/Administrator/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [20.205.243.166] port 443.
debug1: connect to address 20.205.243.166 port 443: Connection timed out
ssh: connect to host github.com port 443: Connection timed out

解决方案:

git bash 中vim ~/.ssh/config
修改内容如下:重点第二行:ssh.github.com
Host github.com
HostName ssh.github.com # 这是最重要的部分
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa

你可能感兴趣的:(数字空间建设指南,编程写作工具链,ssh,git,github)