浏览器大全:是一个提供流行浏览器教程、在线学习分享的学习平台!

处理ssh客户端与服务器加密逻辑不匹配问题

Linux,全称GNU/Linux,是一种免费使用和自由传播的类UNIX操作系统,其内核由林纳斯·本纳第克特·托瓦兹于1991年10月5日首次发布,它主要受到Minix和Unix思想的启发,是一个基于POSIX的多用户、多任务、支持多线程和多CPU的操作系统。
本人在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,curve25519-sha256@libssh.org,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

Linux是一套免费使用和自由传播的类Unix操作系统



相关软件

2345加速浏览器官方版

2345加速浏览器官方版 | 56.2MB

2345加速浏览器官方版

新一代2345加速浏览器采用Chromium和IE双内核,主打极速与安全特性。基于Chromium深度定制,引入网页智能预加载技术,访问网页更快速..

QQ浏览器官方正式版

QQ浏览器官方正式版 | 49.67MB

QQ浏览器官方正式版

QQ浏览器秉承TT浏览器1-4系列方便易用的特点,但技术架构不同,交互和视觉表现也重新设计,采用Chromium内核+IE双内核,让浏览快速稳定...

百度浏览器最新版下载

百度浏览器最新版下载 | 13.3MB

百度浏览器最新版下载

q百度浏览器,是一款简洁轻快、智能懂你的浏览器。依靠百度强大的搜索平台,在满足用户浏览网页的基础上,它整合百度体系业务优势,带给用户更方便的浏览方式功能...

UC浏览器官方正式版

UC浏览器官方正式版 | 44.2MB

UC浏览器官方正式版

UC浏览器(UC Browser)是UC Mobile Limited在2004年8月开发的一款软件,分uc手机浏览器和uc浏览器电脑版。UC浏览器是全球使用量最大的第三方手机浏览器...

猎豹浏览器2022最新版下载

猎豹浏览器2022下载 | 45MB

猎豹浏览器2022最新版下载

猎豹安全浏览器对Chrome的Webkit内核进行了超过100项的技术优化,访问网页速度更快。其具有首创的智能切换引擎,动态选择内核匹配不同网页...

360安全浏览器官方版下载

360安全浏览器下载 | 21.4MB

360安全浏览器官方版下载

360安全浏览器拥有全国最大的恶意网址库,采用恶意网址拦截技术,可自动拦截挂马、欺诈、网银仿冒等恶意网址。独创沙箱技术,在隔离模式即使访问****也不会感染...