Dear Varun,
Thank you for reaching out. SSH timeouts can occur due to idle sessions, firewall rules, or TCP/IP settings. Try to adjust SSH Timeout: Modify to include:
ClientAliveInterval 300
ClientAliveCountMax 2
Then restart SSH: sudo systemctl restart sshd.
Check Azure NSG Rules: Ensure your Network Security Group (NSG) allows persistent SSH traffic. Review rules here.
Enable Boot Diagnostics: Verify VM health via Azure Boot Diagnostics.
TCP Keepalive: Enable keepalive on your client (~/.ssh/config):
ServerAliveInterval 60
For further details, refer to Azure’s SSH troubleshooting guide.
Let me know if the issue persists.
Best regards,
Alex
PS If my answer help to you, please Accept my answer.
PPS that is my answer and it is not a comment :)