Header Ads

Connect to host github.com port 22: Connection timed out

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


This error will happen when some firewall restricts the GitHub. I try to pull the data from the GitHub, the error will be thrown



ERROR


> ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.



Step -1 

First double-check the error thrown in the command, This will becomes, because of the firewall modification

> ssh -T git@github.com

Step -2

Enable ssh connections over the https.
If the ssh connection is not working to pull the data. modify the ssh and force the connection using the https

In the terminal
> sudo nano ~/.ssh/config

Step -3

And add the following data
Host github.com
Hostname ssh.github.com
Port 443


Step -4

Then use this command to check the issues is fixed.
ssh -T git@github.com


Step - 5

The result is
> Hi name, you successfully authenticated
> provide access



Post a Comment

0 Comments