Score:1

How do I debug occasional hang of SSH connection?

cn flag

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?

Score:0
cn flag

I ended up switching to tinyssh connecting to which doesn't exhibit the same behaviour.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.