升级ssh后续问题

升级了openssh后远端的服务器无法通过sftp传输文件到高服务器,后来发现是远端的服务器ssh版本太低,而新升级了openssh的服务器已经不再支持老版本ssh client的相关协议,这时候有两种解决办法,一种是升级远端服务器的openssh client版本,一种是修改升级后的服务器配置文件使其支持旧版本的协议,我这里采用了第二种方式。

 

系统 centos 7

 

查看支持的协议

sshd -T | grep kex

kexalgorithms curve25519-sha256,[email protected],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,[email protected]

 

重启sshd服务

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章