regepanのはてなブログ

個人的なメモ帳レベルの文章。

coreserverにSSHログインした時にHost key verification failed.になりログインできない。

https://www.coreserver.jp/
↑これすね。

ssh {user name}@{host}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
SHA256:blahblahblah.
Please contact your system administrator.
Add correct host key in /Users/xxx/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/xxx/.ssh/known_hosts:3
RSA host key for {host} has changed and you have requested strict checking.
Host key verification failed.


こんなエラーが出る。私SSHの専門家では無いので意味分かんないすね。。
↓ぐぐってもよくわからなかったので、試しにこのファイルを確認するとかな〜り昔にcoreserverにアクセスしたログが...。その行を削除したらログイン出来ました

~/.ssh/known_hosts

ローカル端末側の設定でアクセス出来ないってどういうメリットがあるのかなとか素人なりに思いました。

OpenSSH[実践]入門 Software Design plus

OpenSSH[実践]入門 Software Design plus

これから学ぶmacOSターミナル

これから学ぶmacOSターミナル