Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In batch scripts I often log in to the same system through ssh multiple times. E.g.

seq 1000 | parallel -j0 -S server echo

This triggers a race condition giving the error:

/usr/bin/xauth:  error in locking authority file /home/user/.Xauthority

How can I avoid this?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

Try to not forward X when you log in with ssh. You shouldn't really need it, do you?

If you do not want to take out ForwardX11 true from your ~/.ssh/config (I am guessing that's where it got set), you can try adding -x to the command line.

seq 1000 | parallel -j0 -S server -x echo
share|improve this answer
add comment

You could disable X-forwarding in your SSH config for this server.

For instance in your $HOME/.ssh/config you could have

  Host server
             ForwardX11 no
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.