升级ssh后续问题

升级了openssh后远端的服务器无法通过sftp传输文件到高服务器,后来发现是远端的服务器ssh版本太低,而新升级了openssh的服务器已经不再支持老版本ssh client的相关协议,这时候有两种解决办法,一种是升级远端服务器的openssh client版本,一种是修改升级后的服务器配置文件使其支持旧版本的协议,我这里采用了第二种方式。
 
系统 centos 7
 
查看支持的协议
sshd -T | grep kex
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-group14-sha256,diffie-hellman-group14-sha1
 
修改配置文件为如下所示:
vi /etc/ssh/sshd_config
KexAlgorithms 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
 
重启sshd服务
posted @ 2019-11-12 17:46  断臂人123  阅读(945)  评论(0编辑  收藏  举报