首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >什么是openssh默认kexalgorithms?

什么是openssh默认kexalgorithms?
EN

Stack Overflow用户
提问于 2015-09-21 10:35:27
回答 2查看 40K关注 0票数 9

如果KexAlgorithms没有在ssh配置文件中显式配置,那么openssh可以使用的默认密钥交换算法是什么?

我使用的openssh版本是OpenSSH_6.4p1。

EN

回答 2

Stack Overflow用户

发布于 2015-09-21 11:02:53

经过进一步检查,可以通过两种方式获取此信息。

sshd_config(5)手册页读取

KexAlgorithms指定可用的KEX (密钥交换)算法。多个算法必须用逗号分隔。默认值为ecdh-sha2-nistp256、ecdh-sha2-nistp384、ecdh-sha2-nistp521、diffie-hellman-group-exchange-sha256、diffie-hellman-group-exchange-sha1、diffie-hellman group14-sha1、diffie-hellman group1-sha1。

  • ssh -vvv日志读取(第一部分是客户端支持的kexalgorithm,hmac,ciphers;第二部分是sshd服务器的。)

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: ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,河豚-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha2-256,hmac-sha2-512hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit:保留0 debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman group14-sha1,diffie-hellman group1-sha1 debug2: kex_parse_kexinit: ssh-rsa debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc,arcfour256,arcfour128,3des-cbc,blowfish-cbc,cast128-cbc,arcfour debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-cbc,aes192-cbc,AES256-cbc,arcfour256,四个ARC128,3DES-cbc,blowfish-cbc,ctr 128-cbc,arcfour debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac 64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96,hmac-sha2-256,256hmac-sha2-512 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96,hmac-sha2-256,hmac-sha2-512 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,支持算法的zlib@openssh.com

  • query sshssh -Q kex server (大写-Q)

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 diffie-hellman-group1-sha1 curve25519-sha256@libssh.org

票数 14
EN

Stack Overflow用户

发布于 2018-12-22 01:56:36

ssh -G 192.168.1.2显示了包含kexalgorithms的配置。例如,

代码语言:javascript
运行
复制
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1

如果您只想为kexalgorithms配置diffie-hellman-group1-sha1,

代码语言:javascript
运行
复制
ssh -oKexAlgorithms=diffie-hellman-group1-sha1 username@192.168.1.2
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32686530

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档