0

I have a github account and have installed git in the command line. I have updated the config to contain my username and email and i have generated a keygen using ssh-keygen -t rsa -C "your_email@example.com" and saved the contents of id_rsa.pub in my account settings on github.

However when i test my SSH connection i get:

OpenSSH_8.5p1, OpenSSL 1.1.1j  16 Feb 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/moja/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/moja/.ssh/known_hosts2'
debug2: resolving "github.com" port 22
debug3: ssh_connect_direct: entering
debug1: Connecting to github.com [140.82.121.3] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: connect to address 140.82.121.3 port 22: Connection timed out
ssh: connect to host github.com port 22: Connection timed out

Any advice for a relative newbie on whats going on here any why I cant connect would be greatly appreciated

  • 2
    seems to be slow/weak network. could you try `ping github.com` and also share some information about your system: OS, OS version, baremetal/virtual setup – kevinnls Apr 14 '21 at 10:11
  • ping github seems to suggest that its connecting `(base) moja@manjaro[~]: ping github.com PING github.com (140.82.121.4) 56(84) bytes of data. 64 bytes from lb-140-82-121-4-fra.github.com (140.82.121.4): icmp_seq=1 ttl=50 time=47.8 ms 64 bytes from lb-140-82-121-4-fra.github.com (140.82.121.4): icmp_seq=2 ttl=50 time=47.8 ms ^C --- github.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 47.753/47.854/47.962/0.085 ms` I'm running linux-manjaro – jammer624 Apr 14 '21 at 11:05
  • 2
    Does this answer your question? [ssh: connect to host github.com port 22: Connection timed out](https://stackoverflow.com/questions/15589682/ssh-connect-to-host-github-com-port-22-connection-timed-out) – Kenster Apr 14 '21 at 11:26
  • Can you try downgrading to OpenSSH 8.4p1 and try connecting again? I have the exact same issue with my home connection, through optic fiber. So not speed is the issue as some suggest. Anything newer than v8.4p1 doesn't work through the home network. No idea what breaks it or how to fix it. – cdarken Apr 29 '21 at 20:29

0 Answers0