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?