Strange ssh thing - Keys suddenly decide to stop working.

Andrew Holway a.holway at
Wed Nov 28 19:31:33 EST 2012

## 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"
sleep 60

			for ((iteration=1; iteration < 13; iteration++)); 
					for warehouses in {10..100..10}
							for ((subiteration=1; subiteration <= $iteration; subiteration++)); 
									#we have to do some arithmetic to spawn tpcc within the VM on the right physical node
									#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 &
							sleep 1
							sleep 5

## 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:

## Any ideas?

## Thanks,

## Andrew

More information about the openssh-unix-dev mailing list