• public IP: 4-30 minutes adjustable inbound, 4 minutes fixed outbound.
  • LB: adjustable, 4-100 minutes. Default is 4 minutes.

If you set idle timeout to a large value, you risk reaching the VM connection limit. On the other hand, a very short idle time out could drop valid connections.

For SSH, Azure recommends ClientAliveInterval 180 (30-235 if there are special requirements), corresponding to 75% of default idle timeout.

References