我正在尝试禁用我的 ec2 实例中的任何弱密码/算法。我在以下行中添加了/etc/ssh/sshd_config
...
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour
MACs hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160@openssh.com
...
Run Code Online (Sandbox Code Playgroud)
当我尝试重新启动该sshd
服务时,它没有正确重新启动。所以我做了;
sshd -t
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
错误的 SSH2 mac 规范 'hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160@openssh.com'
有人可以帮我解决这个问题吗?
sshd版本是OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021
2017 年,OpenSSH 7.6 版本中删除了对 RIPE-MD160 HMAC 算法的支持,因此您可能需要检查发布日期以及源的年龄,以支持您决定要包含哪些算法。
根据手册,man sshd_config
可以使用 获得可用 MAC 算法的列表ssh -Q mac
。
从其中进行选择。
现已不复存在的 cypherli.st 建议采用以下强 MAC 算法:
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
Run Code Online (Sandbox Code Playgroud)
和其他设置:
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
Run Code Online (Sandbox Code Playgroud)
但您可能也想确认这些。
归档时间: |
|
查看次数: |
5897 次 |
最近记录: |