Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products

NVE:如何在 NetWorker Virtual Edition 上允許 root SSH 存取

Summary: 本知識文章提供如何為 NetWorker Virtual Edition (NVE) 裝置啟用直接 root 存取的指示。您也可以在 NetWorker Virtual Edition 部署指南中找到類似的說明。

This article applies to   This article does not apply to 

Instructions

根據預設,您無法使用 SSH 以根帳戶登入 NVE 裝置。您必須使用管理員帳戶連線,然後「sudo su -」才能以 root 身分登入。您只能從主控台連線以 root 身分直接登入 (例如:VMware Web 主控台連線)。 

如果您希望使用 SCP 代理直接從 NVE 複製日誌,則使用根帳戶可能會更容易;但是,您仍然可以使用管理員帳戶完成此操作。您必須將檔案放在管理員使用者有權存取的目錄中 (例如:/空格或 /tmp)。請確定檔案具有管理員使用者的讀取權限:

sudo chmod 744 /path/to/file

NetWorker (Linux):如何將檔案複製到 Linux NetWorker 伺服器/從 Linux NetWorker 伺服器複製檔案。
NVE:升級或安裝失敗分級指南


您可以使用以下兩種方法之一啟用根 SSH 存取:

1.啟用全域根 SSH 存取。這可讓 root SSH 從任何網路存取。
2.啟用「受限制」(符合位址) root SSH 存取。這僅允許從指定的 IP 位址或網路存取根 SSH。

全球存取

1.以系統管理員身分 SSH 至 NVE,然後切換至 root:

sudo su -

2.使用 vi 編輯 /etc/ssh/sshd_config 檔案。

vi /etc/ssh/sshd_config

3.尋找「PermitRootLogin」行。

注意:檔案開頭附近有一行經過批示。您可以將其標記為註釋掉。前往檔案的結尾。將 PermitRootLogin no 變更為 PermitRootLogin yes。

範例:
PermitRootLogin yes
Match Address ::1,127.0.0.1,127.0.0.1,::1,192.168.9.101,fe80::250:56ff:fea5:80ff
        PermitRootLogin yes
Match all

4.儲存檔案:

Hit [ESC] then enter :wq!

5.重新啟動 sshd 服務:

systemctl restart sshd

您現在可以在 NVE SSH 存取期間以 root 身分登入。

受限制的 IP/網路 SSH 存取:

1.以系統管理員身分 SSH 至 NVE,然後切換至 root:

sudo su -

2.使用 vi 編輯 /etc/ssh/sshd_config 檔案。

vi /etc/ssh/sshd_config

3.查找靠近檔末尾的“匹配位址”行。
4.更新「匹配位址」行以包含特定IP或網路IP/子網位址。

範例:

PermitRootLogin no
Match Address ::1,127.0.0.1,127.0.0.1,::1,192.168.9.101,fe80::250:56ff:fea5:80ff,192.168.9.0/24
        PermitRootLogin yes

在上面的示例中,只有 192.168.9.0 網路上的系統具有 root SSH 訪問許可權;嘗試從其他網路透過 SSH 以根身分存取 NVE 將會遭到拒絕。同樣,您可以指定單個IP位址而不是網路位址。

5.儲存檔案:

Hit [ESC] then enter :wq!

6.重新啟動 sshd 服務:

systemctl restart sshd

您現在可以在 NVE SSH 存取期間以 root 身分登入,但只能從指定的位址/網路登入。

 
如需其他指示,請參閱 NetWorker Virtual Edition 部署指南

Affected Products

NetWorker

Products

NetWorker Family, NetWorker Series
Article Properties
Article Number: 000225152
Article Type: How To
Last Modified: 24 Sept 2024
Version:  2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.