Article Number: 000025477
SSH 是一種網路通訊協定,可讓您在兩個聯網裝置之間使用安全通道交換資料。SSH被設計為Telnetprotol的替代品,因為Telnet無法保護數據免受“中間人”攻擊。SSH 使用的加密功能可透過不安全的網路 (例如網際網路) 提供資料的機密性和完整性。
為方便管理及整合至其他產品 (例如 DELL EMC DPA),可能需要以程式設計方式存取 DD,而不需要系統管理員每次都提供密碼,或是以不安全的方式將密碼儲存在某些文字檔案上。這就是SSH金鑰身份驗證的用武之地。
SSH 需求
伺服器的主機金鑰不會緩存在註冊表中。您無法保證伺服器是您認為的電腦。伺服器的 rsa2 金鑰指紋為:ssh-rsa 1024 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a 如果您信任此主機,請按下「是」,將金鑰新增至 PuTTY 的快取,並繼續連線。如果您只想繼續連接一次,而不將密鑰添加到緩存中,請點擊“否”。如果您不信任此主機,請按下“取消”以放棄連接。
按一下「是」
產生 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 金鑰的位置在「ssh-keygen
命令輸出。它存儲在.ssh/下的用戶$HOME目錄下,作為名為id_rsa.pub的檔。
將產生的金鑰新增至 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
測試功能。
# 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)
安裝 SSH PuTTY 工具:Windows 系統上的 PuTTY、PuTTYgen 和 Pageant
建立 PuTTY 工作階段。
輸入自動登入使用者名稱。
建立 PuTTY 金鑰。
在 Data Domain 系統命令列中新增金鑰。
adminaccess add ssh-keys
將金鑰連接到 PuTTY。
開啟工作階段。
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 ----------------------------------------- #
Data Domain, DD120 Appliance, DD140 Appliance, DD410 Appliance, DD430 Appliance, DD460 Appliance, DD510 Appliance, DD530 Appliance, DD560 Appliance, DD565 Appliance
DD580 Appliance, DD610 Appliance, DD630 Appliance, DD660 Appliance, DD670 Appliance, DD690 Appliance, DD880 Appliance
02 Jul 2024
4
How To