ssh:connect to host github.com port 22: Connection timed out

解决流程

1.将github的端口由22改为443

ssh -T -p 443 [email protected]

2.接着输入yes进行确认

The authenticity of host '[ssh.github.com]:443 ([192.168.1.100]:443)' can't be established.
TG45532 key fingerprint is SHA256:+dfjeDFlkkfdfkDFKEidkfkDFkkKKdjFESDCFLE.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:1: github.com
Are you sure you want to continue connecting (yes/no/[fingerprint])? 
 

3.在C:\Users\.ssh目录下创建config文件,输入 

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

4.然后进行git push就能推上去,或者使用git pull就能下拉下来。 

你可能感兴趣的:(ssh,github,运维)