2

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 public 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.

7
  • 1
    Just to be clear, you shouldn't add your private SSH key (.ssh/id_rsa) to Github, but rather your public key (.ssh/id_rsa.pub). Anyway, what happens if you use the flag -o IPQoS=none in your ssh command above?
    – htor
    Commented Oct 23, 2023 at 21:43
  • Thank you for answering, It works with your flag! Does It mean I have QoS Policies defined in my system by default? What does it imply and what actions should I take? Commented Oct 24, 2023 at 15:55
  • 1
    I've set my ssh_config to ignore IPQoS with IPQos none. I tried disableing my routers QoS to test it and the issue was still happening, so I'm guessing it has something to do with my server. Commented Oct 24, 2023 at 16:22
  • 1
    If it had worked, then it would have implied that your router (usually it's the router) had some completely broken handling for "new style" (i.e. post-1998) DSCP QoS markings. (When OpenSSH switched from ToS to DSCP a few years ago, it actually uncovered a few things like VMware completely failing to handle such packets...) Commented Oct 24, 2023 at 16:26
  • Have you reloaded/restarted your ssh daemon after changing the config?
    – htor
    Commented Oct 24, 2023 at 16:28

1 Answer 1

1

Running the command with -o IPQoS=none solved the issue in my particular case. I edited ssh_config and added the line IPQoS none, this way it will always perform ssh without Quality of Service.

1
  • Still times out, in my case :(
    – Tony Power
    Commented Mar 24 at 14:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .