Connection to port 22 is not accessible with my network
I'm trying to connect to ssh port 22. But I'm getting this error
Network is unreachable
I was trying to clone a repo from gitlab. But I'm not getting any response. This occurs only when I use a specific network connection. Given below is the result that I got while trying to clone:
Cloning into 'gitlab-ci-poc'...
ssh: connect to host gitlab.com port 22: Network is unreachable
fatal: Could not read from remote repository.
After I changed the network to another provider, it was working.
The same issue occurred when I tried to connect an EC2 machine using SSH. At that time also, I needed to change my network. No idea what is the issue. I don't think it is an issue with my machine, but not sure.
How can I identify the issue? Or is this a network provider's issue. Not sure. How can I troubleshoot???
Thanks in advance.
Solution 1:
There is some issue with the network provider. Sometimes, they blocked perticular ports for some reasons.
- In this problem, you can use git over
https
instead ofssh
.