故障现象:

ssh 111.111.111.111
Unable to negotiate with 111.111.111.111 port 22: no matching MAC found. Their offer: hmac-sha2-512,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-256-etm@openssh.com

临时解决方法

ssh 111.111.111.111 -o macs=hmac-sha2-512

问题点:

 sudo   sshd -T|grep -i macs
 MACs hmac-sha2-512,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-256-etm@openssh.com,hmac-sha1
 此项源与目标一致即可。

源与目标
/etc/ssh/sshd_config
配置文件macs项一致,重启服务。

源环境

 rpm -qa |grep ssh
openssh-keycat-8.8p1-1.el7.bclinux.x86_64
pam_ssh_agent_auth-0.10.3-2.1.el7.bclinux.x86_64
openssh-clients-8.8p1-1.el7.bclinux.x86_64
libssh2-1.4.3-10.el7_2.1.x86_64
openssh-askpass-8.8p1-1.el7.bclinux.x86_64
openssh-8.8p1-1.el7.bclinux.x86_64
openssh-server-sysvinit-8.8p1-1.el7.bclinux.x86_64
openssh-ldap-8.8p1-1.el7.bclinux.x86_64
openssh-debuginfo-8.6p1-2.el7.bclinux.x86_64
openssh-server-8.8p1-1.el7.bclinux.x86_64

目标环境

rpm -qa |grep ssh
openssh-clients-8.8p1-1.el7.centos.x86_64
libssh2-1.8.0-4.el7.x86_64
openssh-askpass-gnome-8.8p1-1.el7.centos.x86_64
openssh-server-8.8p1-1.el7.centos.x86_64
openssh-debuginfo-8.8p1-1.el7.centos.x86_64
openssh-8.8p1-1.el7.centos.x86_64
openssh-askpass-8.8p1-1.el7.centos.x86_64
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐