Dell Unity:如何为启用了 SFTP 的 NAS 服务器禁用 MAC 算法和密码
Summary: 如何为启用了 SFTP 的 NAS 服务器禁用安全性较低的 MAC 算法和密码。(用户可纠正)
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
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
这些参数提供的功能与编辑 cipher 和 macs 以下项的值: 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 服务器才能完全生效。要验证这是否有效,请运行 SFTP 命令,指定已禁用的 MAC 算法以及如下所示的非 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设置。Affected Products
Dell EMC Unity FamilyArticle Properties
Article Number: 000220538
Article Type: How To
Last Modified: 28 May 2025
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.