SSH connection to github from Ubuntu server is timing out. Computer from the same network is able to connect

319 Views Asked by At

When I try to connect via SSH to GitHub from my Ubuntu 22.04 server (i just want to pull from a private repository) I get timeout.

I've seen similar questions to mine but non of the possible solutions worked for me.

Pinging to github.com works properly.

I've tried to run ssh -vT [email protected] and this is all I get:

user@server:~/.ssh$ ssh -vvvT [email protected]
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 matche                                                          d no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_ho                                                          sts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_h                                                          osts2'
debug2: resolving "github.com" port 22
debug3: resolve_host: lookup github.com:22
debug3: ssh_connect_direct: entering
debug1: Connecting to github.com [140.82.121.4] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
(Stays here until timeout)

From my Windows Desktop (that is in the same network) I get Hi <my username>! You've successfully authenticated, but GitHub does not provide shell access.

I added the private key from .ssh folder to github. I even tried to use the same key my Windows PC uses without any luck.

I tried to connect to the 443 port like it's suggested on similar discussions but It behaves the same way.

I disabled the firewall and I still get the same errors.

0

There are 0 best solutions below