PuTTY X11 proxy: wrong authorisation protocol attempted

Solution 1:

While logged in as su, after a few "PuTTY X11 proxy: wrong authorisation protocol attempted" -type errors, I realized it was an authentication problem. Then I remembered to copy the .Xauthority file from my own profile /home directory to /root. Problem solved!

Solution 2:

I had a similar problem on a server at work because the home folder was out of disk space. After login, it couldn't write the Xauthority file and... couldn't forward.

Freeing up space resolved the issue.

I would imagine you would have a similar problem if home folder or .Xauthority permissions were set improperly so you did not have write access.

Solution 3:

Solved.

I got it solved using a mixture of the two mentioned above.

1. I added the following line to '/etc/ssh/sshd_config'

ForwardX11Trusted yes

2. I installed xauth using

sudo apt-get install xauth

xauth list was empty for me before restart. It was, however, populated after the restart. I did xauth list after I tested it with putty.

Then I restarted ssh and it worked. Yay!

Note: What I actually did was restart my Raspberry Pi