MeltingDog MeltingDog - 5 months ago 29
Git Question

Cannot connect to Github via ssh, cannot access .ssh.config

I'm new to Git and command line. I am using a Vagrant virtual box.

Today, I tried pushing some work to Github and got the error:

connect to host port 22: Connection refused

A SE post suggested I try to use:
ssh -T -p 443,
but I got the same message:

connect to host port 443: Connection refused

Another post suggested I check the ssh config settings with
, but I get:

zsh: permission denied: /home/vagrant/.ssh/config

I'm not really sure what to do next. Can anyone point me in the right direction?


I don't know if you follow this link, but it is very helpful.

You are having permission denied to access ~/.ssh/config because this file, just can be edited by the machine admin.

If you are de admin, do sudo vim ~/.ssh/config and then enter with your password and edit the file.

Sometimes, the ssh problem is because you have changed your ssh key, so if the problem insists, remove ssh keys and add then again