解决ssh客户端与服务器加密逻辑不匹配问题
本人在windows下一直在使用一款sftp网络磁盘映射工具 sftpDrive Manager V1.7.9,它能方便的把安装ssh-server的服务器的某个文件夹映射为windows下的网络磁盘。
在升级了ubuntu 16.04 后,发现不能通过该软件映射网络磁盘了,提示 incompatible ssh algorithms (不兼容的加密方式)。
ubuntu16.04下设置sshd的log级别为DEBUG,然后观察sftpDrive与服务端连接时的日志(/var/log/auth.log),摘抄如下:
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30195]: debug1: Forked child 30225.
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: Set /proc/self/oom_score_adj to 0
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: inetd sockets after dupping: 3, 3
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: Connection from 192.168.99.1 port 13329 on 192.168.99.199 port 22
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: Client protocol version 2.0; client software version SftpDrive_1.5
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: no match: SftpDrive_1.5
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: Enabling compatibility mode for protocol 2.0
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: permanently_set_uid: 121/65534 [preauth]
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: SSH2_MSG_KEXINIT received [preauth]
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: kex: algorithm: (no match) [preauth]
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: fatal: Unable to negotiate with 192.168.99.1 port 13329: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 [preauth]
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: do_cleanup [preauth]
Oct 30 18:36:21 lbq-ThinkStation-P320 sshd[30225]: debug1: monitor_read_log: child log fd closed
可以发现,好像是ubuntu16.04上的ssh-server不支持sftpDrive的diffie-hellman-group1-sha1加密方式。
由于sftpDrive软件不再维护,也没发现在哪配置其他加密方式,只能通过修改ssh-server端来适应客户端需求。
网上搜索一番,发现提供了解决方案:
After reading this and this I came up with the changes I needed to do to the /etc/ssh/sshd_configfile:
#Legacy changes
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc
But a more wide legacy set of changes is (taken from here)
#Legacy changes
KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr
相关热词:
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/server/jiqiao/10628.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
EasyDSS RTMP流媒体服务器运
时间:2021-01-07
-
Linux客户端访问NFS报Permi
时间:2021-01-07
-
MobaXterm中运行脚本出现c
时间:2021-01-07
-
解决启动Nginx出现"'THRE
时间:2020-12-29
-
centeros7的redis-cli命令不生
时间:2020-12-29
-
本地java链接远程服务器
时间:2020-12-29
-
在不重启的情况下为Vmwa
时间:2020-12-28
-
英特尔修复Linux CPU漏洞:
时间:2020-12-28
热门文章
-
4种绕过Linux/Unix命令别名的方法
时间:2020-12-26
-
如何检查你的计算机使用的是UEFI还是BI
时间:2020-12-26
-
在Linux下为X1 Carbon CPU降压
时间:2020-12-26
-
为你的Fedora系统增添发音功能
时间:2020-12-28
-
英特尔修复Linux CPU漏洞:19年前的奔腾3也
时间:2020-12-28
-
使用molly-guard保护你的Linux/Unix机器不会被
时间:2020-12-28
-
解决启动Nginx出现"'THREAD_CONCURRENCY' is d
时间:2020-12-29
-
本地java链接远程服务器Linux上redis出错解
时间:2020-12-29
-
Intel CPU底层漏洞事件完全详解:包括修复
时间:2020-12-28
-
在不重启的情况下为Vmware Linux客户机添加
时间:2020-12-28
