I have more than one github account, so to manage them via ssh I put two different entries inside ~/.ssh/config
file.
This is one of them:
Host github_second_account
User git
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/github_second_account
This worked fine until last week.
Now I'm having huge delays when doing a simple git fetch/pull/push
So in order to test what's wroing, I use -vv in a simple connection:
ssh -vvT github_second_account
This is the result:
Enter passphrase for key '/home/myuser/.ssh/github_second_account':
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([ip]:22).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug1: pledge: filesystem full
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug2: channel 0: request shell confirm 1
debug2: channel_input_open_confirmation: channel 0: callback done
// HUGE DELAY HERE (at least 10 minutes):
debug2: channel 0: open confirm rwindow 32000 rmax 35000
debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
debug2: channel 0: rcvd ext data 97
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: rcvd close
debug2: chan_shutdown_read: channel 0: (i0 o1 sock -1 wfd 4 efd 6 [write])
debug2: channel 0: input open -> closed
debug2: channel 0: obuf_empty delayed efd 6/(97)
Hi myuser! You've successfully authenticated, but GitHub does not provide shell access.
The delay starts after It successfully autenticate, specially this two events takes 10 minutes to resolve (each one):
debug2: channel 0: open confirm rwindow 32000 rmax 35000
debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
Do you have any idea how to solve this? I'm running out of ideas.
My system:
Following many tips online and doing a lot of try and error, I find a solution by modifying the system file /etc/ssh/ssh_config
.
Just added this option at the end of the file:
IPQoS 0x00