내 openssh 클라이언트가 지원하는 MAC, 암호 및 KexAlgorithms 목록을 어떻게 찾을 수 있습니까?

내 openssh 클라이언트가 지원하는 MAC, 암호 및 KexAlgorithms 목록을 어떻게 찾을 수 있습니까?

ssh지원하는 MAC, 암호 및 KexAlgorithms를 출력 하는 방법이 있습니까 ?

굳이 소스를 볼 필요 없이 동적으로 알아내고 싶습니다.

답변1

관련 OpenSSH 매뉴얼 페이지:https://man.openbsd.org/ssh#Q

답변2

최신 nmap 버전을 사용하여 지원되는 암호에 대해 SSH 서버를 원격으로 조사할 수도 있습니다.

nmap --script ssh2-enum-algos -sV -p <port> <host>

그리고 온라인 서비스라는 것이 있습니다.sshcheck.com(그리고 제가 방금 알아낸 것과 비슷한 스캐너 프로젝트가 상당히 많습니다).

답변3

일부 이전 버전의 OpenSSH는 이 옵션을 지원하지 않지만 -Q이는 어느 버전에나 작동하며 ssh두 가지를 모두 표시하는 이점이 있습니다.고객그리고섬기는 사람옵션은 다음과 같은 타사 도구가 필요하지 않습니다 nmap.

ssh -vv username@servername

출력을 스캔하여 어떤 암호, KEX 알고리즘, MAC이 지원되는지 확인하세요.

  • 귀하의 고객에 의한:"로컬 클라이언트 KEXINIT 제안"
  • 서버에 의해:"Peer Server KEXINIT 제안"
...
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
...
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
...

답변4

# sudo sshd -T | egrep 'ciphers|macs|kexalgo'

관련 정보