SSH stopped working suddenly. I am using macOS 10.13.4. I am getting timeout every time today but all was working yesterday. I have added my public key to GitHub. I get the following output upon running
$ssh -vvv -T firstname.lastname@example.org OpenSSH_7.7p1, OpenSSL 1.0.2o 27 Mar 2018 debug1: Reading configuration data /Users/nurrony/.ssh/config debug1: /Users/nurrony/.ssh/config line 30: Applying options for github.com debug1: /Users/nurrony/.ssh/config line 47: Applying options for * debug1: Reading configuration data /usr/local/etc/ssh/ssh_config debug2: resolving "github.com" port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to github.com [22.214.171.124] port 22. debug1: connect to address 126.96.36.199 port 22: Operation timed out debug1: Connecting to github.com [188.8.131.52] port 22. debug1: connect to address 184.108.40.206 port 22: Operation timed out ssh: connect to host github.com port 22: Operation timed out
~/.ssh/config reads as follows:
Host github.com ControlMaster auto ControlPersist 120 HostName github.com User git PreferredAuthentications publickey IdentityFile ~/.ssh/nur-macbookpro Host * # Always use SSH2. Protocol 2 # Use a shared channel for all sessions to the same host, # instead of always opening a new one. This leads to much # quicker connection times. ControlMaster auto Controlpath /tmp/ssh-%r@%h:%p ControlPersist 1800 # also this stuff Compression yes TCPKeepAlive yes ServerAliveInterval 20 ServerAliveCountMax 10
I have tried every suggestion found by Web search but nothing is working. I can ssh fine when I connect my Mac with mobile hotspot.
How do I resolve this issue?
My issue has been resolved. I figured out that my ISP was blocking port 22. Thanks everyone who has answered. Specially @JohnKeates