0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OCI#12 Cloud ShellからインスタンスへのSSH接続時エラー

Posted at

概要

Cloud Shellを使用してインスタンスへSSH接続する際のエラー対応のメモ。

エラー内容

userXXX@cloudshell:~ (ap-tokyo-1)$ ssh -i xxxx.key opc@10.0.1.12
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

原因

下記を満たしたときに発生。
Cloud ShellやOCI関連でのエラーではなく、SSH鍵認証によるエラー。

  • Cloud Shellを使用してインスタンス(10.0.1.12)へSSH接続済み
  • .ssh/known_hostsにインスタンス公開鍵追加済み
  • インスタンスを再作成して同一プライベートIPアドレスを設定

対処方法

known_hostsの公開鍵を削除

1.Cloud Shellへ接続
2.公開鍵を削除

userXXX@cloudshell:~ (ap-tokyo-1)$ ssh-keygen -R <IPaddress/Hostname>

再度鍵を使用してSSH接続

1.Cloud Shellへ接続
2.SSH接続

userXXX@cloudshell:~ (ap-tokyo-1)$ ssh -i xxxx.key opc@10.0.1.12
...
[opc@vm02 ~]$ 
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?