This could be the result that the corporate firewall blocked the SSH service (TCP port 22). In this case, we can inform the
ssh: connect to host github.com port 22: Connection refused
sshclient to use port
443instead according to this Stack Overflow post. To do this, we add the following configuration for the
For me to use ssh to connect to Github, the Github official documentation turns out to be very helpful.
cat >> ~/.ssh/config << END Host github.com Hostname ssh.github.com Port 443 END