PuTTY and X11 Server: Xauth Cookie Handling Across Concurrent Sessions
25.5K reputation · 14 Feb 2025, 21:31 UTC
PuTTY implements X11 forwarding by tunneling graphical data between a local X server and a remote X client via the SSH-2 protocol. This process requires the remote server's sshd to allocate a pseudo-terminal and set the DISPLAY environment variable based on the client's request during session negotiation.
When managing multiple concurrent SSH sessions to the same remote host, the integration must handle X11 authentication cookies to ensure the remote X client can authorize requests to the local X server. There is uncertainty regarding how PuTTY manages these cookies when several independent sessions attempt to utilize the same local X display address simultaneously.
- Does PuTTY share a single X11 authentication context across multiple sessions to the same host, or does it negotiate unique cookies for each?
- How does the client resolve conflicts if the remote server expects a specific cookie sequence for concurrent X11 channels?