ssh -X Xforwarding fails "error in locking authority file home/user/.Xauthority

Asked by Bruce Lowden

Using ssh and port 22, I was able to forward the xterm from the server through one Ubuntu desktop to another Ubuntu desktop. It appears as though the forwarding ability has failed. I'm able to load the server gui on the first desktop, but I'm unable to pass the server gui to the second desktop. All of this was working for two years until this week.

from desktop #2
#2 ssh -X user@desktop1 "/user/bin/xauth: error in locking authority file /home/user/.Xauthority not writable, changes will be ignored"
#1 ssh -X user@server
/S startkde "X11 connection rejected due to wrong authentication..."

Any assistance would be greatly appreciated,
BSL

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You have been running gui commands with sudo. You have not used your OS right and screwed the file. It can be fixed but it can be avoided by using it PROPERLY. If you want to run a command like gedit or nautilus with elevated access the nuse gksude NOT sudo and this will NEVER happen.

You can fix this by booting to root recovery mode and running:

cd /home; chown -R user:user ./user

and it will correct it

Can you help with this problem?

Provide an answer of your own, or ask Bruce Lowden for more information if necessary.

To post a message you must log in.