Remote SSH rejected X11
Suppose that our ssh session hangs (freezes) on the following message:
WARNING! The remote SSH server rejected X11 forwarding request
There are at least two 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 another ssh session with another user through the list of processes and stop it. For example:
ps ax | grep your_app
kill your_app_pid