MeltingDog MeltingDog - 1 year ago 96
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?

Answer Source

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


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download