I need to automate passwordless access to ec2 instances in a master/slave configuration.
So for it works but I suspect I hit a snag.
The below are the steps for allowing the ec2 master to ssh into a ec2 slave.
On the master I do the following:
cd /home/ubuntu/.ssh
ssh-keygen -f id_rsa -t rsa -N ''
eval `ssh-agent`
ssh-add ~/.ssh/id_rsa
On the slave I add the above generated id_rsa.pub file to:
/home/ubuntu/.ssh/authorized_keys
So...issue is that that when I ssh into a machine it asks for the following:
RSA key fingerprint is b4:50:7e:5c:5f:41:f5:cd:95:91:78:5b:8a:1f:97:df.
Are you sure you want to continue connecting (yes/no)?
The program I am trying to run;tsung, seems to not work with the prompt even though a password is now not required. So, the programn fails. If I ssh into the slave, thus adding the key, then all works now that hte yes/no is no longer asked. So..the question is, how do I automate the removing the prompt? I can write a script to automatomate e.g. pexpect but that seems long winded.