I routinely run a bunch of experiments (perl scripts) on my lab machines. The client machine I'm currently running my experiments on runs Ubuntu 14.04.5 LTS.
These perl scripts, among other things, ssh over to other machines on the network to gather network/vmstats. These have been working fine, until a recent update (on the client side) broke something, causing the scripts to run exceptionally slowly, with the following error message generated for every
ssh command in the script :
Warning: No xauth data; using fake authentication data for X11 forwarding.
When I turned on
-vvv level logging on my ssh commands, they reveal the following :
debug1: Entering interactive session. debug2: callback start debug2: x11_get_proto: /usr/bin/xauth list unix:10.0 2>/dev/null ***[HANGS FOR 20-30 SECONDS]*** Warning: No xauth data; using fake authentication data for X11 forwarding.
I read all the SO and other forums' discussions I could find related to "interactive session slow" and the xauth warning, but none of the solutions really worked.
I also doubt any of those specific situations apply to me, mainly because I am able to get an ssh session going from the client machine to the server without any problems - it is the ssh's from the perl scripts which have the issue.
I checked the DISPLAY env variable, and it's passing it on correctly to the X11 server (here's the output):
echo $DISPLAY localhost:10.0
xauth is working as well. I created a toy perl script invoked from inside a shell script (to try and simulate what's happening in my lab experiments), and this runs fine with no issues. Here are my toy scripts:
mary.sh #!/bin/sh printenv test.pl | & tee STDOUT-MARY test.pl !/usr/bin/perl system "ssh -vvv <serverIP> 'cat vmstat.log' >> vmstat.mary < /dev/null\n";
Here are things I have also tried (suggestions from SO etc. discussions):
- Adding DISPLAY to the
- Remove MOTD from
I am totally clueless as to why this is happening, and how I can fix it. My lab experiments are running a lot longer than they should because of this issue. Any help on this is greatly appreciated. If you should need any more information to diagnose the issue, I am happy to provide it.