Go to main content
Oracle® ZFS Storage Appliance 管理ガイド、Release OS8.7.0

印刷ビューの終了

更新: 2017 年 3 月
 
 

SSH 公開鍵の設定 (CLI)

SSH 公開鍵は、パスワードを使わずに SSH 接続を許可するのに使用できます。この機能は、管理者の利便性を高め、スクリプトの自動実行に役立ちます。

ユーザーアカウントの SSH 公開鍵を設定するには、次の例を使用します。自分のアカウント以外を使用して CLI にログインしている場合、root ユーザーなど、そのユーザーの鍵が保存されます。現在ログインしているユーザーアカウント以外のユーザーアカウントの鍵を変更する方法については、「例 2」を参照してください。

  • 適切な例を選択します。
使用例 11  現在のユーザーアカウントの SSH 公開鍵の設定

現在のユーザーアカウントの SSH 公開鍵を設定するには、次の CLI コマンドを使用します。

hostname:> configuration preferences
hostname:configuration preferences> show
Properties:
                        locale = C
                  login_screen = status/dashboard
               session_timeout = 15
            advanced_analytics = false

Children:
                             keys => Manage SSH public keys

hostname: configuration preferences> keys
hostname:configuration preferences keys> create
hostname:configuration preferences key (uncommitted)> set type=DSA
hostname:configuration preferences key (uncommitted)> set key="...DSA key text..."
                           key = ...DSA key text...(uncommitted)
hostname:configuration preferences key (uncommitted)> set comment="fw-log1"
                       comment = fw-log1 (uncommitted)
hostname:configuration preferences key (uncommitted)> commit
hostname:configuration preferences keys> show
Keys:

NAME     MODIFIED              TYPE   COMMENT                                  
key-000  07/12/2015 10:54:58   DSA    fw-log1
使用例 12  別のユーザーアカウントの SSH 公開鍵の設定

別のユーザーアカウントの SSH 公開鍵を設定するには、次の CLI コマンドを使用します。


hostname:> configuration users
hostname:configuration users> select john
hostname:configuration users john> preferences show
Properties:
                        locale = C
                  login_screen = status/dashboard
               session_timeout = 15
            advanced_analytics = false

Children:
                             keys => Manage SSH public keys

hostname: configuration users john> preferences keys
hostname:configuration users john preferences keys> create
hostname:configuration users john preferences key (uncommitted)> set type=DSA
hostname:configuration users john preferences key (uncommitted)> set key="...DSA key text..."
                           key = ...DSA key text...(uncommitted)
hostname:configuration users john preferences key (uncommitted)> set comment="fw-log2"
                       comment = fw-log2 (uncommitted)
hostname:configuration users john preferences key (uncommitted)> commit
hostname:configuration users john preferences keys> show
Keys:

NAME     MODIFIED              TYPE   COMMENT                                  
key-001  07/13/2015 10:57:58   DSA    fw-log2