一、准备openssh8.3安装包 openssh-8.3_centos6_centos7.tar.gz
二、执行升级操作
解压
rpm -Uvh *.rpm
chmod 400 /etc/ssh/ssh_host_ecdsa_key
chmod 400 /etc/ssh/ssh_host_ed25519_key
chmod 400 /etc/ssh/ssh_host_rsa_key
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
systemctl restart sshd
如果无法连接:
/var/log/messages ###提示
Unable to negotiate with 124.65.116.170 port 55336: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 [preauth]
解决方法:
cat >>/etc/ssh/sshd_config <<-EOF
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
EOF
systemctl restart sshd

726

被折叠的 条评论
为什么被折叠?



