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?
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.You could disable X-forwarding in your SSH config for this server.
For instance in your
$HOME/.ssh/config
you could have