Hello,
i have 10 machines, machine A execute this script:
This is my script:
nb_lignes=`wc -l $1 | cut -d " " -f1`
for i in $(seq $(($nb_lignes - 1)) )
do
machine=`head $1 -n $i | tail -1`
machine1=`head $1 -n $nb_lignes | tail -1`
ssh root@$machine -x " scp /home/file.txt root@$machine1:/home && rm -r /home/file.txt"
done
Please i have this error at run:
Host key verification failed. lost connection
have you an idea please ?
Thank you so much.
Adhi
October 22, 2012, 4:59pm
2
Try to use this
nb_lignes=`wc -l $1 | cut -d " " -f1`
for i in $(seq $(($nb_lignes - 1)) )
do
machine=`head $1 -n $i | tail -1`
machine1=`head $1 -n $nb_lignes | tail -1`
ssh -x root@$machine " scp /home/file.txt root@$machine1:/home && rm -r /home/file.txt"
done
What's the difference please between :
ssh root@$machine -x " scp /home/file.txt root@$machine1:/home && rm -r /home/file.txt"
and
ssh -x root@$machine " scp /home/file.txt root@$machine1:/home && rm -r /home/file.txt"
Thank you so much
But i have tested ssh root@$machine -x with other command and it works correctly!!
Are you sure this is the cause of the error ?
i'm not connected now to the machines , i'will test it tomorrow
but i think this is not the cause.. I am not convinced...
Adhi
October 22, 2012, 5:19pm
8
Am not sure about it.. Let me to check and find the right one!!