Score:0

ไม่สามารถเพิ่ม HostKeyAlgorithms เก่า Ciphers KexAlgorithms ไปยัง sshd_config ไม่มีข้อผิดพลาด alg ของคีย์โฮสต์

ธง us

ฉันมีลินุกซ์ 2 กล่อง หนึ่งคือ CentOS 6 หนึ่งคือ Fedora 35

opensh ของ CentOS 6 เก่าเกินไปและเซิร์ฟเวอร์ Fedora 35 sshd ปฏิเสธการเชื่อมต่อ ฉันต้องการเพิ่ม HostKeyAlgorithms เก่า Ciphers KexAlgorithms กลับไปที่ sshd_config ของ Fedora 35

สิ่งที่ฉันเพิ่มเข้ามามีดังต่อไปนี้

# เพิ่มการสนับสนุนลูกค้าเก่า
ยันต์ +aes128-cbc
MACs +hmac-sha1
HostKeyAlgorithms +ssh-dss
อัลกอริทึม Kex +diffie-hellman-group1-sha1

ใช้ได้ทั้งสองด้าน

ssh -Q ยันต์
3des-cbc
aes128-cbc
aes192-cbc
aes256-cbc
aes128-ctr
aes192-ctr
aes256-ctr
[email protected]
[email protected]
[email protected]
[hans@fedora ssh]$ ssh -Q MACs
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[hans@fedora ssh]$ ssh -Q HostKeyAlgorithms
ssh-ed25519
[email protected]
[email protected]
[email protected]
ssh-rsa
rsa-sha2-256
rsa-sha2-512
ssh-dss
ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[hans@fedora ssh]$ 
[hans@fedora ssh]$ 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
[email protected]
[email protected]

หลังจากรีบูต / รีสตาร์ท sshd

sudo sshd -T | grep -i HostKeyAlgorithm
อัลกอริทึมคีย์โฮสต์ ecdsa-sha2-nistp256,[email protected],[email protected],[email protected],ecdsa -sha2-nistp384,[email protected],ecdsa-sha2-nistp521,[email protected],ssh-ed25519,ssh-ed25519-cert-v01 @openssh.com,[email protected],[email protected],rsa-sha2-256,[email protected],rsa -sha2-512,[email protected]

sudo sshd -T | grep -i kexalgorithm
gssapikexalgorithms gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-
kexalgorithms curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie -Hellman-group16-sha512,diffie-Hellman-group18-sha512

sudo sshd -T | grep -i ตัวเลข
ยันต์ [email protected],[email protected],aes256-ctr,[email protected],aes128-ctr

บน CentOS6 มันยังคงให้ข้อผิดพลาดนี้กับฉันเหมือนกับไฟล์ปรับแต่งที่ไม่เคยเปลี่ยนแปลง

ssh -vv 192.168.1.6
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 ก.พ. 2556
debug1: อ่านข้อมูลการกำหนดค่า /etc/ssh/ssh_config
debug1: การใช้ตัวเลือกสำหรับ *
debug2: ssh_connect: needpriv 0
debug1: กำลังเชื่อมต่อกับพอร์ต 192.168.1.6 [192.168.1.6] 22
debug1: สร้างการเชื่อมต่อแล้ว
debug1: ไฟล์ข้อมูลประจำตัว /home/hans/.ssh/identity type -1
debug1: ไฟล์ข้อมูลประจำตัว /home/hans/.ssh/identity-cert ประเภท -1
debug1: ไฟล์ข้อมูลประจำตัว /home/hans/.ssh/id_rsa ประเภท -1
debug1: ไฟล์ข้อมูลประจำตัว /home/hans/.ssh/id_rsa-cert ประเภท -1
debug1: ไฟล์ข้อมูลประจำตัว /home/hans/.ssh/id_dsa ประเภท -1
debug1: ไฟล์ข้อมูลประจำตัว /home/hans/.ssh/id_dsa-cert ประเภท -1
debug1: ไฟล์ระบุตัวตน /home/hans/.ssh/id_ecdsa ประเภท -1
debug1: ไฟล์ข้อมูลประจำตัว /home/hans/.ssh/id_ecdsa-cert ประเภท -1
debug1: โปรโตคอลระยะไกลเวอร์ชัน 2.0, ซอฟต์แวร์ระยะไกลเวอร์ชัน OpenSSH_8.7
debug1: จับคู่: OpenSSH_8.7 pat OpenSSH*
debug1: การเปิดใช้งานโหมดความเข้ากันได้สำหรับโปรโตคอล 2.0
debug1: สตริงเวอร์ชันท้องถิ่น SSH-2.0-OpenSSH_5.3
debug2: fd 3 การตั้งค่า O_NONBLOCK
debug1: ส่ง SSH2_MSG_KEXINIT แล้ว
debug1: ได้รับ SSH2_MSG_KEXINIT แล้ว
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],ssh-dss-cert-v00@openssh คอม, ssh-rsa, ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,[email protected]
debug2: kex_parse_kexinit: hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96
debug2: kex_parse_kexinit: hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96
debug2: kex_parse_kexinit: ไม่มี,[email protected],zlib
debug2: kex_parse_kexinit: ไม่มี,[email protected],zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follow 0 
debug2: kex_parse_kexinit: สงวนไว้ 0 
debug2: kex_parse_kexinit: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14- sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512
debug2: kex_parse_kexinit: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: [email protected],[email protected],aes256-ctr,[email protected],aes128-ctr
debug2: kex_parse_kexinit: [email protected],[email protected],aes256-ctr,[email protected],aes128-ctr
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],hmac- sha2-256,hmac-sha1,[email protected],hmac-sha2-512
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],hmac- sha2-256,hmac-sha1,[email protected],hmac-sha2-512
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follow 0 
debug2: kex_parse_kexinit: สงวนไว้ 0 
debug2: mac_setup: พบ hmac-sha1
debug1: kex: server->client aes128-ctr hmac-sha1 ไม่มี
debug2: mac_setup: พบ hmac-sha1
debug1: kex: client->server aes128-ctr hmac-sha1 ไม่มี
ไม่มีโฮสต์คีย์ alg
Score:0
ธง us

ฉันพบในหัวข้ออื่น ดังนั้นโดยพื้นฐานแล้ว sshd_config จึงถูกเขียนทับโดย /etc/crypto-policies/back-ends/opensshserver.config

ฉันเพิ่งแสดงความคิดเห็นทุกอย่างในไฟล์นั้นและเพิ่มบรรทัดต่อไปนี้เพื่อแก้ปัญหา

ยันต์ +aes128-cbc
MACs +hmac-sha1
อัลกอริทึม Kex +diffie-hellman-group1-sha1
HostKeyAlgorithms +ssh-dss,ssh-rsa
PubkeyAcceptedAlgorithms +ssh-dss,ssh-rsa
djdomi avatar
za flag
จำไว้ว่าคุณต้องยอมรับคำตอบของคุณเอง

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา