Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

使用 SSH (SSH) 登录远程 Data Domain 而不提供密码

Summary: 本文列出了有关如何配置和使用安全外壳 (SSH) 客户端连接到 Data Domain 系统的步骤,使用 SSH 密钥登录而无需提供密码。

This article applies to   This article does not apply to 

Instructions

SSH 是一种网络协议,允许使用两个联网设备之间的安全通道交换数据。SSH 的设计宗旨是替代 Telnet 协议,因为 Telnet 无法保护数据免受“中间人”攻击。SSH 使用的加密方法可在不安全的网络(如互联网)上保证数据的机密性和完整性。

 

出于方便、易于管理以及集成到其他产品(例如 DELL EMC DPA)的目的,可能需要以编程方式访问 DD,而不需要管理员每次都提供密码或者将密码不安全地存储在文本文件中。这就是 SSH 密钥身份验证发挥作用的地方。

 

SSH 要求

  • 安装了 SSH 客户端(如 OpenSSHPuTTY)的计算机
  • 使用 TCP 端口 22 的 IP 网络连接
  • SSH 服务器已启用并侦听 TCP 端口 22(这是 Data Domain 系统的默认端口)
  • 测试一开始是否可以使用用户名和密码通过 SSH 连接到远程 DD:

 

  1. 在远程系统上运行 SSH 客户端软件。
  2. 配置 SSH 客户端以使用 Data Domain 系统主机名或 IP 地址进行连接。
    • 如果使用 PuTTY,请保留默认端口 (22),然后单击:“Open”。
    • 如果是首次连接,则会显示如下所示的消息:

      服务器的主机密钥未缓存在注册表中。无法保证服务器是您认为的计算机。服务器的 rsa2 密钥指纹为:ssh-rsa 1024 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a。如果您信任此主机,请单击 Yes 以将密钥添加到 PuTTY 的缓存并继续连接。如果您只想继续连接一次,而不将密钥添加到缓存中,请单击 No。如果您不信任此主机,请单击 Cancel 放弃连接。

      单击 Yes
  3. 登录系统。如果是首次连接到 Data Domain 系统,“sysadmin”用户密码尚未更改:
    • 用户名是:sysadmin
    • 密码是系统的序列号 180583

 

将系统配置为不使用密码登录:在 Linux 或 UNIX 系统上

 

警告:从 DDOS 6.0 开始,我们将提供 OpenSSH 7.1。由于 DSA 密钥的固有弱点,它禁用了对 DSA 密钥的支持。因此,在连接到 DDOS 6.0 或更高版本时,“dsa”类型的密钥将不起作用,只能使用“rsa”类型的密钥。

 

  1. 生成 SSH 密钥。
    #### 建议的密钥类型为“rsa”,并且是唯一适用于 DDOS 6.0 及更高版本的密钥类型

    # ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub.

    ####“dsa”类型的密钥也适用于 DDOS 5.7 或更低版本,但不再建议使用此密钥类型

    # ssh-keygen -t dsa
    Generating public/private dsa key pair. Enter file in which to save the key (/root/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_dsa.

     

    DDOS 命令参考中提到要使用“ d”选项而不是“-t dsa”。任一选项都适用于 DDOS,但“ d”不适用于许多 Linux 发行版。

    在运行脚本时,使用空白密码选项可绕过 Data Domain 系统密码要求。

    记下“ssh-keygen”命令输出中新 SSH 密钥的位置。它是一个名为 id_rsa.pub 的文件,存储在用户 $HOME 目录的 .ssh/ 下。

  2. 将生成的密钥添加到 Data Domain 系统访问列表。

    # ssh -l sysadmin 168.192.2.3 "adminaccess add ssh-keys" < ~/.ssh/id_rsa.pub
    The authenticity of host '168.192.2.3(168.291.2.3)' can't be established. RSA key fingerprint is f6:36:6e:32:e1:2d:d9:77:40:7e:0e:f8:5f:32:8d:0a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '168.192.2.3' (RSA) to the list of known hosts. Data Domain OS 0.31.0.0-152384 Password: sysadmin_password
  3. 测试功能。

    # ssh sysadmin@168.192.2.3 "df -h"
    
    Data Domain OS Resource Size GiB Used GiB Avail GiB Use% Cleanable GiB* ------------------ -------- -------- --------- ---- -------------- /backup: pre-comp - 50.0 - - - /backup: post-comp 4922.3 2.7 4919.7 0% 0.0 /ddvar 78.7 0.5 74.2 1% - ------------------ -------- -------- --------- ---- -------------- * Estimated based on last cleaning of 2010/02/02 06:00:59.

 

您还可以将文件中系统命令的整个脚本传递给设备。这是通过运行命令以指向包含命令列表的特定文件来实现的:

# ssh sysadmin@DDR < FULL_LOCAL_PATH_TO_SCRIPT_TO_RUN_ON_REMOTE_DD

 

这允许操作者在远程主机上创建命令列表,然后通过 SSH 一次性运行所有这些命令。

 

将系统配置为不使用密码登录:Windows 系统 (PuTTY)

  1. 安装 SSH PuTTY 工具:Windows 系统上的 PuTTY、PuTTYgen 和 Pageant

  2. 创建 PuTTY 会话。

    1. 启动 PuTTY 配置工具 PuTTY。
    2. 使用 Data Domain 系统 IP 地址保存会话。
      1. 在 PuTTY Configuration 对话框中,选择 Category > Session
      2. 选择 SSH 按钮。
      3. 在 Host Name 字段和 Saved Sessions 字段中输入 Data Domain 系统 IP 地址。例如:168.192.2.3
      4. 单击 Save
        PuTTY 配置
  3. 输入自动登录用户名。

    1. 在 PuTTY Configuration 对话框中,选择 Category > Connection > Data
    2. 在 Auto-login username 字段中输入管理员用户名。例如:
      sysadmin
    3. 单击 Save
  4. 创建 PuTTY 密钥。

    1. 启动 PuTTY 密钥生成器工具 PuTTYgen。
      PuTTY 密钥生成器工具
    2. 使用 PuTTY 密钥生成器工具生成公钥和私钥。
      1. 通过将光标移动到 Key 字段中的空白区域来生成一些随机性。
        Public key for pasting into the OpenSSH authorized_keys file 字段将填充随机字符。
        Key fingerprint 字段将填充参考值。
      2. 在 Key comment 字段中创建密钥标识符,键入标识密钥名称,例如:
        admin_name@company.com
      3. 将Key passphrase 和 Confirm passphrase 字段留空。
        在运行脚本时,使用空白密码选项可绕过 Data Domain 系统密码要求。
      4. 单击 Save public key。
      5. 单击 Save private key。
        记下保存的密钥文件的路径。密钥文件名示例:
        DataDomain_private_key.ppk
    3. 复制随机生成的 PuTTY 密钥。
      选择 Public key for pasting into the OpenSSH authorized_keys file 字段中的所有文本。
      PuTTY 密钥生成器
  5. 在 Data Domain 系统命令行中添加密钥。

    1. 打开 Data Domain 系统命令提示符。
    2. 添加管理 SSH 访问密钥。在命令行中键入:
      adminaccess add ssh-keys
    3. 粘贴 PuTTYgen 字段中随机生成的密钥。使用鼠标右键单击 > Paste 选项。
    4. 完成命令,按 CTRL+D 组合键。
      Data Domain 系统命令提示符
  6. 将密钥附加到 PuTTY。

    1. 在 PuTTY 配置工具中,选择 Connection > SSH > Auth
    2. 勾选复选框 Attempt authentication using Pageant
    3. 勾选复选框 Attempt keyboard-interactive auth (SSH-2)
    4. 在 Private key file for authentication 字段中,单击 Browse
    5. 浏览到在步骤 3 中生成并保存的 PuTTY 密钥。例如,DataDomain_private_key.ppk
    6. 保存设置,单击 Save
      puTTY 配置保存设置
  7. 打开会话。

    1. 在 PuTTY Configuration 对话框中,选择 Category > Session
    2. 单击打开
      Windows 命令行将打开。PuTTY 会话将打开。
      使用用户名 sysadmin 和公钥进行 Data Domain 操作系统身份验证
      admin_name@company.com 
      Last login: Thu Feb 4 10:51:10 EST 2010 from 168.192.2.3 on pts/2 
      Last login: Thu Feb 4 18:56:14 2010 from 168.192.2.3 
      Welcome to Data Domain OS 0.31.0.0-152384 ----------------------------------------- #

 

Affected Products

Data Domain, DD120 Appliance, DD140 Appliance, DD410 Appliance, DD430 Appliance, DD460 Appliance, DD510 Appliance, DD530 Appliance, DD560 Appliance, DD565 Appliance

Product

DD580 Appliance, DD610 Appliance, DD630 Appliance, DD660 Appliance, DD670 Appliance, DD690 Appliance, DD880 Appliance
Article Properties
Article Number: 000025477
Article Type: How To
Last Modified: 02 Jul 2024
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.
Article Properties
Article Number: 000025477
Article Type: How To
Last Modified: 02 Jul 2024
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.