I have an embedded system that normally connects via ssh to a certain system, the OS is on flash mem and nothing can be changed.I have now replaced the destination system with another and thanks to iptables rules the embedded system goes to the correct new destination.I have taken the entire .ssh/ of the old system and put on the new one, but upon connection attempt, I get:Host key mismatch for dest-system !Fingerprint is md5 41:ba:3c:f1:0b:f6:21:58:2c:ce:cb:52:30:c1:c1:19Expected md5 9f:e2:51:98:4d:49:4a:d5:eb:1d:f5:18:62:3f:6c:b7If you know that the host key is correct you canremove the bad entry from ~/.ssh/known_hostsSince I cannot change the known_hosts (read-only OS), I don't understand why copying the .ssh didn't work. Is it because the IPs are different ?PS: is that akin to a MITM ?
Replacing one ssh server by another while keeping keys
ssh
The host keys are stored in /etc/ssh. Each server will generate new ones (obviously different), but you can just copy them to replacement server.