SSHエラー:警告:リモートホストIDが変更されました!

SSHエラー:警告:リモートホストIDが変更されました!

rsync(cygwin) を実行しましたが、このエラーが発生しました。昨夜、Red Hat Linux OSをバージョン5からバージョン6に変更したようです。これがこのエラーメッセージの原因かもしれませんか?この問題を解決するにはどうすればよいですか? cygwinを設定した後、sysadmが私のコンピュータでssh-keygenというコマンドを実行したことを覚えています。ファイルを再実行してファイルをRH6サーバーにコピーする必要がありますか?

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Please contact your system administrator.
Add correct host key in /home/xxxxx/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/xxxxx/.ssh/known_hosts:2
RSA host key for xxxxx has changed and you have requested strict checking.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at /home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/io.c(605) [Receiver=3.0.9]

ベストアンサー1

ホストがホストキーを変更したと考えると、前のエントリを削除できます。これは、前の項目が2行目にあることを示しているため、次のことができます。

sed -i -e '2d' ~/.ssh/known_hosts

既知のホストファイルから古いエントリを削除します。

おすすめ記事