1.2 SSHホスト鍵

一部のオペレーティング・システムでは、CLIに最初にログインすると、次のように、~/.ssh/known_hostsファイルへのOracle VM Managerホストの鍵フィンガープリントを追加するように求められます。

$ ssh -l admin hostname -p 10000
The authenticity of host 'hostname (IP_address)' can't be established.
DSA key fingerprint is fingerprint.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'hostname' (DSA) to the list of known hosts.
admin@hostname's password:

このメッセージを避けて、known_hostsファイルにホスト鍵を自動的に追加するには、次のコマンドを使用してSSHホスト鍵の厳密なチェックをオフにできます。

$ ssh -o 'StrictHostKeyChecking no' admin@hostname

Oracle VM Managerをアップグレードまたは再インストールした場合、次のように、CLIに接続したときに、ホストの識別が変更されたというプロンプトが表示されることがあります。

$ ssh -l admin hostname -p 10000
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 DSA host key has just been changed.
The fingerprint for the DSA key sent by the remote host is
fingerprint.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in ~/.ssh/known_hosts:1
DSA host key for localhost has changed and you have requested strict checking.
Host key verification failed.

このメッセージをクリアし、CLIへの接続を許可するには、次のように、ssh-keygenユーティリティを使用して、Oracle VM Managerホストのエントリを削除します。

$ ssh-keygen -R hostname:10000

前述のコマンドがエントリを削除しない場合、次のように、ホスト名を中カッコで囲む必要があることがあります。

$ ssh-keygen -R [localhost]:10000

または、~/.ssh/known_hostsファイルを編集して、Oracle VM Managerホストのエントリを削除します。

CLIに再び接続すると、SSHホスト鍵の厳密なチェックが有効になっている場合、新しいフィンガープリントを追加するように求められます。