{"id":1286,"date":"2015-12-21T16:08:31","date_gmt":"2015-12-21T22:08:31","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=1286"},"modified":"2015-12-21T16:09:10","modified_gmt":"2015-12-21T22:09:10","slug":"rsa-host-key-for-server-has-changed","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2015\/12\/rsa-host-key-for-server-has-changed\/","title":{"rendered":"RSA host key for server has changed"},"content":{"rendered":"<p>I had reformatted one of my hypervisor boxes (prox) and completely forgot about changing my SSH keys on other systems. I have a jumpbox that allows me to remotely access and admin the environment, but I couldn&#8217;t SSH into my prox system:<\/p>\n<blockquote><p>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br \/>\n@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @<br \/>\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br \/>\nIT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!<br \/>\nSomeone could be eavesdropping on you right now (man-in-the-middle attack)!<br \/>\nIt is also possible that the RSA host key has just been changed.<br \/>\nThe fingerprint for the RSA key sent by the remote host is<br \/>\n2a:35:00:00:c7:e8:f3:fe:f7:6e:cf:00:00:db:e9:d8.<br \/>\nPlease contact your system administrator.<br \/>\nAdd correct host key in \/root\/.ssh\/known_hosts to get rid of this message.<br \/>\nOffending key in \/root\/.ssh\/known_hosts:33<br \/>\nRSA host key for prox1 has changed and you have requested strict checking.<br \/>\nHost key verification failed.\n<\/p><\/blockquote>\n<p>Opening up my \/root\/.ssh\/known_hosts file I see a bunch of giberish. Answer found from <a href=\"http:\/\/askubuntu.com\/questions\/455635\/how-to-remove-offending-key-in-git-when-you-try-to-push-your-chanes\" target=\"_blank\">c0rp<\/a>.<\/p>\n<p><strong>Fast and easy fix<\/strong><br \/>\n<code>sed -i '33d' ~\/.ssh\/known_hosts<\/code><br \/>\nObviously change the &#8217;33d&#8217; to reflect your line number. e.g line 12 wouild be &#8217;12d&#8217;<br \/>\nThen SSH to your machine again and you&#8217;ll be asked if you want to store the new RSA fingerprint.<\/p>\n<p><strong>Or you can use SSH Keygen<\/strong><br \/>\n<code>ssh-keygen -R yourmachinenamehere<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had reformatted one of my hypervisor boxes (prox) and completely forgot about changing my SSH keys on other systems. I have a jumpbox that allows me to remotely access and admin the environment, but I couldn&#8217;t SSH into my prox system: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2015\/12\/rsa-host-key-for-server-has-changed\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">RSA host key for server has changed<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1286","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=1286"}],"version-history":[{"count":2,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1286\/revisions"}],"predecessor-version":[{"id":1288,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1286\/revisions\/1288"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=1286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=1286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=1286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}