Andrew Holway
2012-Nov-28 08:31 UTC
Strange ssh thing - Keys suddenly decide to stop working.
## Hi, ## I have a script that spawns a process on a remote virtuozzo(container based vm thing) machine then waits for it to complete. Its a bit hacked about but you should be able to get the idea. function spawntpcc { while ! ssh -v $vmhostnameprefix$1 <<EOF "$tpccrootdir"/tpcc-mysql/tpcc_start -h localhost -d tpcc -u root -w "$3" -c 8 -r "$warmuptime" -l "$runtime" > /cm/shared/tpcc/"$runname"/"$3"/"$vmhostnameprefix""$1"-result-"$2" EOF do sleep 60 done } for ((iteration=1; iteration < 13; iteration++)); do for warehouses in {10..100..10} do for ((subiteration=1; subiteration <= $iteration; subiteration++)); do #we have to do some arithmetic to spawn tpcc within the VM on the right physical node ode001=$(($subiteration)) #two significant digits for the hostname node001=$(printf %02d%s ${a%.*} ${a##*.} $ode001) ssh -v $vmhostnameprefix$node001 "mkdir -p $tpccrootdir/$runname/$drive/$warehouses" spawntpcc $node001 $iteration $drive $warehouses & done sleep 1 wait sleep 5 done done ## The script runs fine, the keys are working perfectly util a seemingly random time when it cant read the keys any more and is asking for a passphrase (with a gnome util). The first time it fails after 6 iterations and this time after 4 iterations. debug1: read_passphrase: can't open /dev/tty: No such device or address debug1: permanently_drop_suid: 0 (gnome-ssh-askpass:26625): Gtk-WARNING **: cannot open display: localhost:11.0 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password Permission denied, please try again. debug1: read_passphrase: can' t open /dev/tty: No such device or address ## This is the output of the script at the point where it fails: http://pastie.org/5446639. ## Any ideas? ## Thanks, ## Andrew
Andrew Holway
2012-Nov-28 10:22 UTC
Strange ssh thing - Keys suddenly decide to stop working.
Hi, I was having agent hell. please ignore :) Thanks, Andrew On Nov 28, 2012, at 10:18 AM, Andrew Holway wrote:> ## Hi, > > ## I have a script that spawns a process on a remote virtuozzo(container based vm thing) machine then waits for it to complete. Its a bit hacked about but you should be able to get the idea. > > function spawntpcc { > while ! ssh -v $vmhostnameprefix$1 <<EOF > "$tpccrootdir"/tpcc-mysql/tpcc_start -h localhost -d tpcc -u root -w "$3" -c 8 -r "$warmuptime" -l "$runtime" > /cm/shared/tpcc/"$runname"/"$3"/"$vmhostnameprefix""$1"-result-"$2" > EOF > do > sleep 60 > done > } > > > for ((iteration=1; iteration < 13; iteration++)); > do > for warehouses in {10..100..10} > do > for ((subiteration=1; subiteration <= $iteration; subiteration++)); > do > #we have to do some arithmetic to spawn tpcc within the VM on the right physical node > ode001=$(($subiteration)) > #two significant digits for the hostname > node001=$(printf %02d%s ${a%.*} ${a##*.} $ode001) > ssh -v $vmhostnameprefix$node001 "mkdir -p $tpccrootdir/$runname/$drive/$warehouses" > spawntpcc $node001 $iteration $drive $warehouses & > done > sleep 1 > wait > sleep 5 > done > done > > ## The script runs fine, the keys are working perfectly util a seemingly random time when it cant read the keys any more and is asking for a passphrase (with a gnome util). The first time it fails after 6 iterations and this time after 4 iterations. > > debug1: read_passphrase: > can't open /dev/tty: No such device or address > debug1: permanently_drop_suid: 0 > > (gnome-ssh-askpass:26625): Gtk-WARNING **: cannot open display: localhost:11.0 > debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password > Permission denied, please try again. > debug1: read_passphrase: can' > t open /dev/tty: No such device or address > > > ## This is the output of the script at the point where it fails: http://pastie.org/5446639. > > ## Any ideas? > > ## Thanks, > > ## Andrew