I have been trying to get ssh to connect to Github using port 443 and I have decided to use a custom ssh config file at ~/.ssh/config. After creating the file and setting the proper file permissions I attempt to connect again, the connection is still timing out on port 22. I know this because port 22 is blocked by my ISP (for some strange reason).
$ cd ~/.ssh
$ touch config
$ chown $USER config
$ chmod 644 config
Then in the config file I add this:
Host pagodabox.io
  HostName git.pagodabox.io
  Port 443
Host github.com
  HostName ssh.github.com
  Port 443
Then I attempt to call this from my iTerm app.
$ ssh -T [email protected]
I get the error:
ssh: connect to host ssh.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.
However, if I do this
$ ssh -T -p 443 [email protected] 
I get the desired response.
Hi [Username]! You've successfully authenticated, but GitHub does not provide shell access.
I am using oh-my-zsh FWIW. Why is this happening? I have rebooted my mac also. Still the file doesn't seem to be recognised
You wrote:
 Host github.com
   HostName ssh.github.com
   Port 443
But didn't use it:
 ssh -T [email protected]
You need to
 ssh -T [email protected]
to use the github.com host you defined.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With