Skip to content

TROUBLESHOOTING clean older user's public key

Why do that

When trying to deploy for the first time on new servers.


TASK [generate_and_keep_sshkey : clean older user's public key] *************************************
fatal: [node1 -> localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Sorry, try again.\n[sudo via ansible, key=cxovcygfdxcgwltqoopoyihexwbqjkul] password: \nsudo: 1 incorrect password attempt\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}

Try to connect manually on your node you may have this warning.

ssh adm-infra@node1
Warning: the ECDSA host key for 'node2' differs from the key for the IP address ''
Offending key for IP in /home/admin/.ssh/known_hosts:15
Matching host key in /home/admin/.ssh/known_hosts:17
Are you sure you want to continue connecting (yes/no)?

What to do

Remove old ssh known host manually:

# where 17 corresponds to the matching line number 
sed -i '17d' ~/.ssh/known_hosts

Then, retry a manual ssh connection then, continue to deploy punchplatform !

If the error remain, contact support at