6 Ubuntu 22.04 LTS Client Linux Mint 21 Client
rclaver edited this page 2023-11-05 13:50:04 +01:00

Problem: Can't connect to github from ssh Linux Mint 21

I have executed the following actions to connect to github

# create ssh key
usu@serv:~$ ssh-keygen -t rsa -b 4096 -C usu@serv.xxx

Your public key has been saved in /home/usu/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:sssssssssssssssssssssssssssssssssssssssssss usu@serv.xxx

Next I have exported my public key to my github profile -> SSH keys / Authentication Keys

# Connect to github
usu@serv:~$ ssh -vT git@github.com

OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: connect to address 140.82.121.3 port 22: Connection timed out
ssh: connect to host github.com port 22: Connection timed out

# Verify connection with github
usu@serv:~$ ping github.com

PING github.com (140.82.121.3) 56(84) bytes of data.
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=1 ttl=53 time=35.9 ms
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=2 ttl=53 time=35.7 ms
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=3 ttl=53 time=35.2 ms
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=4 ttl=53 time=35.7 ms
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=5 ttl=53 time=35.8 ms
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=6 ttl=53 time=35.9 ms
^C
--- github.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5029ms
rtt min/avg/max/mdev = 35.225/35.704/35.904/0.224 ms