たとえば以下。sshで鍵が変わって37行目がおかしいよと言われた場合。
$ ssh my@192.168.13.3 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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 ***********************************************. Please contact your system administrator. Add correct host key in /**************/.ssh/known_hosts to get rid of this message. Offending key in /**************/.ssh/known_hosts:37 RSA host key for 192.168.13.3 has changed and you have requested strict checking. Host key verification failed.
この鍵を削除するには以下のようにして、-iと-e 'd'を使う。-iは変更内容を引数のファイルに書き込むオプション
$ sed -i -e '37d' /**************/.ssh/known_hosts