Search code examples
linuxubuntuopenssh

OpenSSH client hangs on logout when forwarding X connections


I setup Ubuntu Linux to run an OpenSSH server. My DSL router is port forwarding the SSH connection. When I use

ssh -X myhost

and then open some GUI program, then close the GUI application and exit, then the SSH logout hangs. <Ctrl>-c seems to work but its annoying to have to press it everytime. The logout will not hang if I don't open a GUI.

Anyone have ideas how to fix this problem?


Solution

  • This is because the process you start opens a stream (stdout/stderr) and doesn't close it. Have a look here for a more in-depth explanation and possible solutions.