Go to main content

Oracle® ZFS Storage Appliance 管理指南,发行版 OS8.8.x

退出打印视图

更新时间: 2021 年 8 月
 
 

设置 SSH 公钥 (CLI)

使用 SSH 公钥,可在不使用密码的情况下建立 SSH 连接。此功能非常有用,不仅能为管理员提供便利,还可以自动执行脚本。

使用此过程可为当前登录的用户或您对其具有 changePreferences 授权的任何用户设置 SSH 公钥。有关获取 changePreferences 授权的信息,请参见用户授权和“编辑用户的例外 (BUI, CLI)”。

  1. 转至 configuration users
  2. 选择要为其编辑首选项的用户。
    hostname:configuration users> select username
  3. 输入 preferences keys,然后输入 show 以列出任何现有 SSH 密钥。
    hostname:configuration users username> preferences keys
    hostname:configuration users username preferences keys> show
  4. 配置 SSH 密钥。

    输入 create 以创建新 SSH 密钥。

    设置 type(DSA 或 RSA)、key 和(可选)comment(用于说明此密钥的用途)。

  5. 输入 commit

    输入 show 以查看新密钥。

  6. 输入 done
  7. (u53ef选) 或者,使用 configuration preferences

    此方法仅允许为当前登录的用户创建 SSH 密钥。

    1. 转到 configuration preferences keys
    2. 输入 create
    3. 设置 typekey 和(可选)comment
    4. 依次输入 commitshowdone

相关主题