Solution to MobaXterm X11 proxy: Authorisation not recognised

While using remote SSH client MobaXTerm to open up X-11 forwarded GUI app with root privileges, an error message pops up:

MobaXterm X11 proxy: Authorisation not recognised


The GUI app actual crashed with this error and not showing up on client desktop. Here's the solution:

From your MobaXTerm SSH client console after login:

$
$ sudo xauth add $(xauth -f /home/[USER]/.Xauthority list|tail -1)
$


According to mobatek's blog,

We receive a lot of emails asking how to keep X11-forwarding working after changing user to root inside a SSH session in MobaXterm. This is by default not allowed on Unix/Linux systems, because the X11 display connection belongs to the user you used to log with when connecting to your remote SSH server. X11-forwarding mechanism does not allow anyone to use the open display.
However, in some cases you may need to start a graphical application like nedit or firefox in a sudo or su context. In order to achieve this, you could manually retrieve X credentials in the su/sudo context by looking up the “xauth list” for the original username and then adding them using “xauth add” to the current context.
You can also use a single (magic) command in order to achieve this!
The single line of command helps solving problems whenever you need to have a working X11 display through SSH after becoming root.

Update:

The aforementioned method would not survive another SSH login as MIT-MAGIC-COOKIE always changes during user login. The cookie previously copied to ROOT account will become obsolete.

To permanently resolve this, we need root privilege to ADD the following statement to the end of the file /etc/sudoers:

#
Defaults env_keep += "XAUTHORITY"
#

This is enough to allow sudo opening Xorg program. Also, env_keep actually points to environment variable "XAUTHORITY" which is the location of .Xauthority. So you may add the following EXPORT statement to ~/.bashrc or set it globally in the file /etc/environment (CentOS 7)

#
EXPORT XAUTHORITY=/home/[YOUR_USERNAME]/.Xauthority
#

This method ensure that remote sudo opening works even after next SSH login or SSH server reboot.




18 comments:

  1. MobaXterm 21.3 Crack
    MobaXterm 21.3 Crack is a powerful tool for controlling and managing remote systems. This advanced tool provides a number of features for ordinary users to computer networking professionals, thereby eliminating the need for other similar tools. The program includes several features that push the application over a simple remote control. Programmers, webmasters, IT professionals, etc. They are the people who want to meet their daily needs in specialized fields with the help of this software.

    ReplyDelete



  2. Thanks for sharing, if you want more benefits then remain connect with us.

    MobaXterm Crack

    ReplyDelete
  3. It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content. forbes

    ReplyDelete
  4. Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written. Business

    ReplyDelete
  5. I would recommend my profile is important to me, I invite you to discuss this topic... forbes

    ReplyDelete
  6. Super site! I am Loving it!! Will return once more, Im taking your food likewise, Thanks. https://hufforbes.com/

    ReplyDelete
  7. I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read!! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site. Skin Care

    ReplyDelete
  8. Very informative post ! There is a lot of information here that can help any business get started with a successful social networking campaign ! Skin Care

    ReplyDelete
  9. So nice I am enjoying for that post as for u latest version of this Security tool Available
    mobaxterm crack

    ReplyDelete


  10. Such a Nice post. Thanks for Awesome tips Keep it up
    mobaxterm-crack

    ReplyDelete
  11. Great set of tips from the master himself. Excellent ideas. Thanks for Awesome tips Keep it up
    mobaxterm-crack
    teamviewer-crack
    ultramixer-crack
    faststone-capture-crack

    ReplyDelete
  12. Thanks for sharing the crack but you need to update this version because here new version Available below;

    https://licensedinfo.com/mobaxterm-crack/

    ReplyDelete
  13. PC Software Download
    You make it look very easy with your presentation, but I think this is important to Be something that I think I would never understand
    It seems very complex and extremely broad to me. I look forward to your next post,
    YouTube Movie Maker Crack
    Final Cut Pro Crack
    Design Doll Crack
    Easypano Tourweaver Pro Crack
    Smart Game Booster Crack
    Twinmotion Crack
    Blumentals Screensaver Factory Crack
    ZModeler Crack

    ReplyDelete
  14. I read this article! I hope you will continue to have such articles to share with everyone! thank you! You can Visit my website
    https://icracker.net/https://icracker.net/

    a4scandoc crack

    ytd video downloader pro crack

    wondershare pdfelement pro crack

    ReplyDelete
  15. After looking through a few blog articles on your website,we sincerely appreciate the way you blogged. “Thank you so much for sharing all this wonderful info with the how-to's!!!! It is so appreciated!!!” “You always have good humor in your posts/blogs. So much fun and easy to read!

    MobaXterm Crack

    GridinSoft Anti-Malware Crack

    Articulate Storyline Crack

    Rekordbox DJ Crack

    Movavi Video Editor Crack

    ReplyDelete
  16. I'm really impressed with your writing skills, as smart as the structure of your


    Latest Software Free Download



    weblog. Is this a paid topic



    Mediacoder crack



    do you change it yourself? However, stopping by with great quality writing, it's hard to see any good blog today.



    Push video wallpaper -crack





    Iobit start menu -crack





    Pinnacle pro -crack



    ammyy admin pro crack

    ReplyDelete
  17. This was a lifesaver! I had been struggling with the MobaXterm X11 proxy issue for hours, and your solution worked perfectly. Thanks for sharing such a clear and effective fix!boris Yasir252

    ReplyDelete

apt install through corporate proxy

Assuming proxy service like CNTLM is up and running on Ubuntu machine, one can use apt-get to install package with specifying http proxy inf...