จากซอฟต์แวร์สแกนช่องโหว่ของฉัน ฉันได้รับแฟล็ก/ข้อความนี้
เปิดใช้งานอัลกอริธึมการแลกเปลี่ยนคีย์ที่อ่อนแอต่อไปนี้:
diffie-hellman-group-exchange-sha1
diffie-Hellman-group1-sha1
ฉันต้องการปิดใช้งานอัลกอริทึมทั้งสองนี้
ฉันสอบถาม sshd_config...
[รูท@vm01 ~]# sshd -T | grep "\(ciphers\|macs\|kexalgorithms\)"
gssapikexalgorithms gss-gex-sha1-,gss-group1-sha1-,gss-group14-sha1-
ยันต์ chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
macs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384, ecdh -sha2-nistp256,diffie-hellman-group-exchange-sha256
[รูท@vm01 ~]# ssh -Q kex
diffie-Hellman-group1-sha1
diffie-Hellman-group14-sha1
diffie-Hellman-group14-sha256
diffie-Hellman-group16-sha512
diffie-Hellman-group18-sha512
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
เส้นโค้ง25519-sha256
curve25519-sha256@libssh.org
gss-gex-sha1-
gss-group1-sha1-
gss-group14-sha1-
[รูท@vm01 ~]# sshd -T | เกรป เค็กซ์
gssapikexalgorithms gss-gex-sha1-,gss-group1-sha1-,gss-group14-sha1-
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384, ecdh -sha2-nistp25
ดังที่คุณเห็นจากผลลัพธ์ ลูกค้าสามารถใช้อัลกอริทึมเหล่านี้ได้ ไม่มีการกล่าวถึงอัลกอริทึมที่ไม่เหมาะสมใน sshd_config แม้แต่ในไฟล์ ยันต์
ส่วน:
ยันต์ chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
ความช่วยเหลือใด ๆ ที่ชื่นชม
หมายเหตุ ฉันใช้ OpenSSH 7.4
sshd_config
ยันต์ chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384, ecdh -sha2-nistp256,diffie-hellman-group-exchange-sha256,-diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1