WARNING! The remote SSH server rejected X11 forwarding request

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:

  1. 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
  1. 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
Telegram channel

If you still have any questions, feel free to ask me in the comments under this article or write me at promark33@gmail.com.

If I saved your day, you can support me 🤝

Leave a Reply

Your email address will not be published. Required fields are marked *