Add-keypair fails sloppily if ssh keys dont match

Bug #578523 reported by Chris Bunch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppScale
Confirmed
Wishlist
Unassigned

Bug Description

If we replace a VM with a new one and forget to clean up the known_hosts file, appscale-add-keypair becomes unhappy:

cgb@magna-carta:~/appscale-tools/ips$ appscale-add-keypair --ips ips.yaml
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
50:ad:99:68:e5:33:83:c8:31:31:7c:90:73:52:8f:59.
Please contact your system administrator.
Add correct host key in /home/cgb/.ssh/known_hosts to get rid of this message.
Offending key in /home/cgb/.ssh/known_hosts:191
RSA host key for 128.111.55.222 has changed and you have requested strict checking.
Host key verification failed.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
50:ad:99:68:e5:33:83:c8:31:31:7c:90:73:52:8f:59.
Please contact your system administrator.
Add correct host key in /home/cgb/.ssh/known_hosts to get rid of this message.
Offending key in /home/cgb/.ssh/known_hosts:191
RSA host key for 128.111.55.222 has changed and you have requested strict checking.
Host key verification failed.
lost connection

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
50:ad:99:68:e5:33:83:c8:31:31:7c:90:73:52:8f:59.
Please contact your system administrator.
Add correct host key in /home/cgb/.ssh/known_hosts to get rid of this message.
Offending key in /home/cgb/.ssh/known_hosts:191
RSA host key for 128.111.55.222 has changed and you have requested strict checking.
Host key verification failed.
lost connection

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
50:ad:99:68:e5:33:83:c8:31:31:7c:90:73:52:8f:59.
Please contact your system administrator.
Add correct host key in /home/cgb/.ssh/known_hosts to get rid of this message.
Offending key in /home/cgb/.ssh/known_hosts:191
RSA host key for 128.111.55.222 has changed and you have requested strict checking.
Host key verification failed.
lost connection

Need to catch the first failure and abort or fix the problem ourselves, as having it add the keypair for a dozen boxes and fail on the last is not fun for the user.

Tags: tools
Chris Bunch (cgb-cs)
Changed in appscale:
status: New → Confirmed
assignee: Chris Bunch (cgb-cs) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.