I try to start a screen session and connect to three different machines with the same user.
Here is what I have in my
screen -t "machine1" 0 ssh user@machine1 screen -t "machine2" 1 ssh user@machine2 screen -t "machine3" 2 ssh user@machine3
I get the following error in the terminals of
Warning: No xauth data; using fake authentication data for X11 forwarding /usr/X11/bin/xauth: error in locking authority file /home/user/.Xauthority
If I remove only one of the machines from my .screenrc it works correctly.
How can I avoid this error and connect to multiple machines from screen.
The user home dir is on NFS and locking doesn't work properly with NFS.
To circumvent this I tried hard to either have the XAuthority file on a local file system (/tmp) or to have one file per ssh. I didn't manage, somehow my xauth seems to completely ignore the
XAUTHORITY environment variable. Still puzzeled...
ForwardX11when you want to use graphical sessions. As far as I know,
screenis just character based?)
ssh -f -N(in some shell script, instead of using
screen) would be an option, then at least you can add some
sleepcommand in between the 3 commands? Or maybe move the 3
.screenrcinto some shell script, using