IBM Support

[Db2] DPF で Open SSH を使用する場合のインストールおよびセットアップ方法

Question & Answer


Question

複数データベース・パーティション (DPF) でパーティション間のコマンド実行はデフォルトでは rsh で行われます。 rsh の代わりに Open SSH を使う場合のインストールとセットアップ手順について教えてください。

Answer

OpenSSH のインストールおよびセットアップ を参考に Open SSH のインストールした実行例を以下に示します

[DPF 環境で ssh を使う場合]
1. OpenSSL のダウンロード
AIX Web Download Pack Programs

2. ssh のインストール
ssh は AIX の DVD からインストールします。

3. ssh のセットアップ
a. ssh のセットアップを行います。
  • $ ssh-keygen -t dsa -b 1024
    Generating public/private dsa key pair.
    Enter file in which to save the key (/home/db2inst1/.ssh/id_dsa):リターンキー
    Created directory '/home/db2inst1/.ssh/id_dsa'.
    Enter passphrase (empty for no passphrase):リターンキー
    Enter same passphrase again:リターンキー
    Your identification has been saved in /home/db2inst1/.ssh/id_dsa.
    Your public key has been saved in /home/db2inst1/.ssh/id_dsa.pub.
    The key fingerprint is:
    省略@hostname
    The key's randomart image is:
    +--[ DSA 1024]----+
    省略
    +-----------------+

b. 作成された id_dsa,pub を authorized_keys に追加します。
  • $ cat ./id_dsa.pub > ~/.ssh/authorized_keys

c. ssh コマンドを使用して localhost および自ホストの情報を記録します。
  • $ ssh localhost ls
    The authenticity of host 'localhost (127.0.0.1)' can't be established.
    RSA key fingerprint is 省略
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'localhost' (RSA) to the list of known hosts.

    $ ssh hostname ls
    The authenticity of host 'db2srv (192.168.1.120)' can't be established.
    RSA key fingerprint is 省略
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'hostname,10.1.1.168' (RSA) to the list of known hosts.

d. /etc/ssh/sshd_config を編集します。
以下のように HostbasedAuthentication no をコメントアウトして HostbasedAuthentication yes を追記します。
  • sshd_config より抜粋;
    ---
    #HostbasedAuthentication no
    HostbasedAuthentication yes
    ---

e. sshd に対して SIGHUP を送って設定を反映します。
  • # ps -ef | grep sshd
    # kill -HUP <pid_of_sshd>

f. データベース・パーティション間のコマンド実行に ssh を使うよう設定します。
  • $ db2setDB2RSHCMD=/usr/bin/ssh
    $ db2start


関連情報
パスポート・アドバンテージによく寄せられる質問
Configure DB2 Universal Database for UNIX to use OpenSSH
AIX Web Download Pack Programs

パーティション・データベース環境のセットアップ
通信変数

お問合せ先
技術的な内容に関して、パスポート・アドバンテージの契約のもと Db2 テクニカル・サポートへお問い合わせください。
Db2 テクニカル・サポート

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PkjAAE","label":"DPF"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"All Versions"}]

Document Information

Modified date:
31 August 2023

UID

swg21623695