Suppose that our ssh session hangs (freezes) on the following message:
WARNING! The remote SSH server rejected X11 forwarding request
There are at least 2 unobvious reasons why this can happen:
- Too many terminals are open at the same time. You can check the number of open terminals using the command:
ls /dev/pts/ | wc -l
- A hung application is running in one of the open ssh sessions. You need to track it from other ssh session with other user through the list of processes and stop it. For example:
ps ax | grep your_app
kill your_app_pid
If you still have any questions, feel free to ask me in the comments under this article, or write me on promark33@gmail.com.