PuTTY를 사용하여 새 시스템에 연결하려고 하는데 다음이 표시됩니다.
치명적인 오류: 호스트 키 알고리즘에 동의할 수 없습니다(사용 가능: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256).
서버에서 사용 가능한 알고를 확인하는 중:
acoder@client ~ $ nmap --script ssh2-enum-algos -sV -p 22 server.name.here
Starting Nmap 7.01 ( https://nmap.org ) at 2021-04-16 10:33 EDT
Nmap scan report for server.name.here (1.1.1.1)
Host is up (0.018s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.0 (protocol 2.0)
| ssh2-enum-algos:
| kex_algorithms: (7)
| 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
| server_host_key_algorithms: (3)
| rsa-sha2-512
| rsa-sha2-256
| ecdsa-sha2-nistp256
| encryption_algorithms: (6)
| [email protected]
| aes256-ctr
| aes256-cbc
| [email protected]
| aes128-ctr
| aes128-cbc
| mac_algorithms: (6)
| [email protected]
| [email protected]
| [email protected]
| hmac-sha2-256
| hmac-sha1
| hmac-sha2-512
| compression_algorithms: (2)
| none
|_ [email protected]
내 클라이언트 컴퓨터에서 사용할 수 있는 기능은 다음과 같습니다.
PubkeyAcceptedKeyTypes
acoder@client ~ $ ssh -Q key
ssh-ed25519
[email protected]
ssh-rsa
ssh-dss
ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
암호
acoder@client ~ $ ssh -Q cipher
3des-cbc
blowfish-cbc
cast128-cbc
arcfour
arcfour128
arcfour256
aes128-cbc
aes192-cbc
aes256-cbc
[email protected]
aes128-ctr
aes192-ctr
aes256-ctr
[email protected]
[email protected]
[email protected]
MAC
acoder@client ~ $ ssh -Q mac
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
hmac-ripemd160
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Kex알고리즘
acoder@client ~ $ ssh -Q kex
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
[email protected]
내가 여기서 무엇을 간과하고 있습니까?
답변1
PuTTY와 ssh(OpenSSH)가 완전히 별개의 두 프로그램이라는 점을 간과하고 계십니다. 그들은 어떤 코드도 공유하지 않습니다. 그들은 일반적인 암호화 라이브러리를 사용하지 않습니다. 목록 ssh -Q
에는 PuTTY가 지원할 수 있는 항목에 대한 정보가 없습니다.
문제는 PuTTY 버전이 너무 오래되었다는 것입니다. 서버에서 제공하는 서명 방법 중 ECDSA 서명( ecdsa-sha2-nistp256
)에는 PuTTY 버전 이상이 필요합니다.0.68, RSA-SHA2 방법( rsa-sha2-*
)은 다음 PuTTY 릴리스(0.75)에서만 사용할 수 있습니다.
그 원인은 OpenSSH 서버가 ssh-rsa
최근에 이전 SHA1 기반 서명 알고리즘에 대한 지원을 비활성화한 반면(여전히 동일한 RSA 키를 사용하지만 SHA2 기반 서명을 통해서만 사용함) DSA 키에 대한 지원은 몇 년 전에 제거되었기 때문입니다. .