我正在尝试使用erlang模块连接到openssh (版本: SSH-2.0-OpenSSH_6.7p1 Debian-6)服务器。OpenSSH server 使用默认配置。
做以下工作:
ssh:connect(Server, 22, [MyFancyOptions])给予:
Selection of key exchange algorithm failed事实上,通过观看Wireshark,我看到erlang客户端提出的密钥交换算法:
diffie-hellman-group1-sha1和服务器:
curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1不匹配..。
问:有什么方法连接到erlang的ssh服务器吗?
PS。是的我看到了
%% TODO: diffie-hellman-group14-sha1 should also be supported.
%% Maybe check more things ...
verify_algorithm(#alg{kex = 'diffie-hellman-group1-sha1'}) ->但别告诉我神圣的二郎不能处理现代的生活.
发布于 2015-07-14 14:41:55
是的,似乎您需要增强您的服务器以提供额外的KexAlgorithms,所以如下所示:
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp 256,ecdh-sha2-nistp 384,ecdh-sha2-nistp 521,diffie-hellman-group-exchange-sha256,diffie-hellman-group 14-sha1,diffie-hellman-group 1-sha1 1
但是..。这样做了,我没有成功地做任何有用的事情。我在日志中看到了一个错误:
sshd8026: dispatch_protocol_error:类型30 seq 7
因此,Erlang模块似乎与现代ssh有一些重要的问题。
发布于 2016-04-26 12:46:02
如果在/etc/ ssh /sshd_config中将openssh配置为openssh6.0默认值,OTP 15中的Erlang ssh客户端将与openssh-6.7服务器一起工作,如下所示:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour
KexAlgorithms 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-sha1Erlang客户端只支持在openssh-6.7中默认不启用的密码at 128-cbc、3 3des cbc,至少在Debian openssh包中不支持。
https://stackoverflow.com/questions/31193906
复制相似问题