PuTTY を使用した CLI への接続

PuTTY および plink ユーティリティーの実行方法について熟知していることが必要です。

注: Windows ユーザーは、Web サイト Download Putty から PuTTY をダウンロードできます。

セキュア・シェル (SSH) プロトコルでは、新しいホスト・サーバーへの最初のアクセス時に、SSH サーバー公開鍵またはユーザー・パスワードを受け入れるための確認の問い合わせを SSH ユーザーに送信することを指定しています。 今回は SSH サーバーへの初めての接続であるため、サーバーは、既知のホストの SSH クライアント・リストに含まれていません。 したがって、フィンガープリント確認の問い合わせが行われ、その際に、ホストとの接続を行う役割を受け入れるかどうかが尋ねられます。 y を入力すると、ホストのフィンガープリントと IP アドレスが SSH クライアントによって保管されます。

PuTTY を使用する場合は、さらに y を入力して、このホストのフィンガープリントを受け入れる必要があります。 しかし、ホストの指紋と IP アドレスは、Windows にログオンしているユーザー名のレジストリーに保管されます。

また、SSH プロトコルでは、SSH サーバー公開鍵が受け入れられた後、SSH サーバーのフィンガープリントが以前に受け入れられたものと異なる場合、確認の問い合わせを再度送信することを指定しています。この場合、変更されたこのホストのフィンガープリントを受け入れるかどうかを決める必要があります。

注: Storwize® V3700上の SSH サーバー鍵は、クラスター化システム上でマイクロコード・ロードが実行されると再生成されます。その結果、SSH サーバーのフィンガープリントが変更されるため、確認の問い合わせが送信されることになります。
コマンド・ライン・インターフェース (CLI) コマンドはすべて 1 つの SSH セッション内で実行されます。これらのコマンドは、以下のいずれかのモードで実行できます。
  • 対話式プロンプト・モード
  • 単一行コマンド・モード。このモードに入ると、一度ですべてのパラメーターを含めることができます。

対話モード

対話モードの場合、PuTTY 実行可能プログラムを使用して、SSH 限定シェルをオープンできます。

システムは、管理 IP アドレス上で同時に最大 32 の対話式 SSH セッションをサポートします。
注: 1 時間後に、修正された SSH 対話式セッションがタイムアウトになります。つまり、この SSH セッションは自動的にクローズされます。このセッション・タイムアウトの限度は構成できません。
以下に、対話モードを開始するときに発行するコマンドの例を示します。
C:\support utils\putty <username>@svcconsoleip

ここで、support utils¥putty は putty.exe ファイルの場所、<username>管理 GUI の IP アドレス、<username> は使用するユーザー名です。

システム上に保管されている SSH クライアント公開鍵をリストする lsuser コマンドを発行した場合、ssh_key=yes であれば以下の出力が表示されます。
IBM_2145:cluster0:superuser>lsuser 
id name      password ssh_key remote usergrp_id usergrp_name 
0  superuser yes      yes     no     0          SecurityAdmin 
1  smith     no       yes     no     4          Monitor 
2  jones     no       yes     no     2          CopyOperator 

exit と入力し Enter を押すと、対話モード・コマンドをエスケープできます。

以下に、対話モードで plink を使用する場合の、ホストの指紋確認の問い合わせの例を示します。

C:\Program Files\IBM\svcconsole\cimom>plink superuser@9.43.225.208
The server's host key is not cached in the registry. ユーザー
have no guarantee that the server is the computer you
think it is.
The server's key fingerprint is:
ssh-rsa 1024 e4:c9:51:50:61:63:e9:cd:73:2a:60:6b:f0:be:25:bf
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y
Using user name "superuser".
Authenticating with public key "imported-openssh-key"
IBM_2145:your_cluster_name:superuser>

単一行コマンド

単一行コマンド・モードでは、1 つのコマンド・ラインに以下のすべてを入力できます。

C:¥Program Files¥IBM¥svcconsole¥cimom>
	plink superuser@9.43.225.208 lsuser
Authenticating with public key "imported-openssh-key"
id name      password ssh_key remote usergrp_id usergrp_name 
0  superuser yes      yes     no     0          SecurityAdmin 
1  smith     no       yes     no     4          Monitor 
2  jones     no       yes     no     2          CopyOperator 
注: 単一行コマンド・モードですべてのパラメーターを使用して 1 つの CLI コマンドを実行依頼すると、SSH サーバー・ホストの指紋が最初に出現した時点で確認の問い合わせを受け取ります。 バッチ・スクリプト・ファイルをサブミットする前に、SSH サーバー・ホストの指紋が受け入れられているか確認してください。

以下に、単一行コマンド・モードで plink を使用する場合の、ホストの指紋確認の問い合わせの例を示します。

C:¥Program Files¥IBM¥svcconsole¥cimom>
 plink superuser@9.43.225.208 lsuser
 The server's host key is not cached in the registry. ユーザー
have no guarantee that the server is the computer you
think it is.
The server's key fingerprint is:
ssh-rsa 1024 e4:c9:51:50:61:63:e9:cd:73:2a:60:6b:f0:be:25:bf
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y
Authenticating with public key "imported-openssh-key"
id name      password ssh_key remote usergrp_id usergrp_name 
0  superuser yes      yes     no     0          SecurityAdmin 
1  smith     no       yes     no     4          Monitor 
2  jones     no       yes     no     2          CopyOperator