Sometimes (but not every time - roughly 3 attempts of every 10 work) when I try to connect to a VM hosted on Azure, my SSH connection hangs before giving me a shell; the last message in the verbose debug log is:
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
When running it with strace
, the latest syscall that it shows looks like this:
pselect6(7, [3], [], NULL, NULL, NULL)
Looks at server side logs this is what I see:
Accepted publickey for <USER> from <MY IP> port 29478 ssh2: RSA SHA256:<FINGERPRINT>
pam_unix(sshd:session): session opened for user <USER> by (uid=0)
- Connecting to other VMs hosted on Azure (even in same region) poses no issues. I verified and there's no different in SSH server version on both of them.
- When using other VMs as a jump host, it works all 10 times in a row
How do I approach debugging this?