Dell Unity:如何停用啟用 SFTP 之 NAS 伺服器的 MAC 演算法和密碼

摘要: 如何為啟用 SFTP 的 NAS 伺服器停用安全性較低的 MAC 演算法和加密。(使用者可修正)

本文适用于 本文不适用于 本文并非针对某种特定的产品。 本文并非包含所有产品版本。

说明

Unity 提供的參數,可自訂在啟用了 SFTP 的 NAS 伺服器上執行之 SSHD 例項所提供的 MAC 演算法和密碼。最好禁用由安全掃描軟體識別的不太安全的密碼。

由於沒有 sshd_config 可為啟用 SFTP 的 NAS 伺服器編輯的檔案,Unity 提供兩個參數來取代標準功能。若要查看有關這些參數及其目前設定的資訊,請執行以下命令:

svc_nas ALL -param -f sshd -i cipher
svc_nas ALL -param -f sshd -i mac

這些參數提供的功能與編輯 ciphermacs 中的值 sshd_config 在運行標準 OpenSSH 伺服器實現的標準 Linux 或 UNIX 主機上。用於該配置檔中這些值的逗號分隔格式也可以用於提供給用於設置這些參數的命令的值。

若要查看可與參數一起使用的 MAC 演算法清單,請從主機執行以下命令:
 

注意:
  • 「ivan2」為預設使用者,但也可以使用任何偏好使用者。
  • 「5.6.7.14」是啟用 SFTP 的 NAS 伺服器 IP 位址範例。 
  • 此命令將啟動 SSH 連接。當系統提示您輸入密碼時,請使用 ctrl+c 按鍵順序中斷連線,或在收到「確定要繼續連線嗎?」提示時以「否」回應。
# ssh -vvv ivan2@5.6.7.14 2>&1 | grep -E "MAC|cipher"
debug2: ciphers ctos: aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc
debug2: ciphers stoc: aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc
debug2: MACs ctos: hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512
debug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none
第二行上列出的任何密碼都應該是密碼參數更改的有效輸入。第四行中列出的任何演演演算法都應該是 MAC 參數更改的有效輸入。

在此範例中,參數設定為僅允許 hmac-sha2-512-etm@openssh.com MAC 演算法:
svc_nas ALL -param -f sshd -m mac -v hmac-sha2-512-etm@openssh.com

注意:若要允許多個 MAC 演算法,請使用逗號分隔的清單。
 
svc_nas ALL -param -f sshd -m mac -v hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
 
警示:系統可能允許您指定無效的 MAC 演算法,將所有使用者鎖定在 SFTP 伺服器之外。注意指定正確的演演演算法。

參數必須全域設定,而且可能需要 SP 或 NAS 伺服器重新開機才能完全生效。若要驗證其是否正常運作,請執行指定已停用的 MAC 演算法的 SFTP 命令,以及如下所示的非 AEAD 密碼:
# sftp -oMACs=hmac-sha1 -oCiphers=aes256-ctr ivan2@5.6.7.14
Unable to negotiate with 5.6.7.14 port 22: no matching MAC found. Their offer: hmac-sha2-512-etm@openssh.com
Connection closed.
Connection closed
在上述輸出中,SFTP 伺服器拒絕連接,因為 HMAC 演算法 hmac-sha1 已禁用,並且用戶端未使用 AEAD 代替 MAC 來提供完整性。如果不強制使用非 AEAD MAC,即使強制禁用 MAC,這仍可能成功,因為用戶端在使用 AEAD 時仍可能忽略 MAC 設置。

受影响的产品

Dell EMC Unity Family
文章属性
文章编号: 000220538
文章类型: How To
上次修改时间: 28 5月 2025
版本:  4
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。