Users may experience PAM session disconnections during brief network interruptions, particularly when using VPN clients like Zscaler. This article clarifies why this occurs and provides recommendations to improve session resilience.
When a network interruption occurs, the client's operating system often tears down the virtual network adapter to re-establish a secure tunnel (e.g., when switching from Wi-Fi to Wired or re-connecting a VPN). During this process, the operating system sends an explicit TCP Reset (RST) command to the PAM server. While PAM is designed to tolerate silent packet loss, an explicit RST packet is a security instruction that forces the server to close the socket immediately to prevent potential session hijacking. Because SSH and RDP applets are stateful connections, once the underlying socket is closed by the OS, the session cannot be transparently recovered.
To improve resilience, consider the following configurations: