jenkins通过ssh连接远程服务器出错解决方案(Algorithm negotiation fail)

错误截图

在这里插入图片描述
jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [192.168.13.104]. Message [Algorithm negotiation fail]]

将需要连接的目标服务器通过电脑ssh连接

编辑文件:vim /etc/ssh/sshd_config
将文件中对应的行更换为下面的数据

HostKeyAlgorithms ssh-ed25519,[email protected],rsa-sha2-256,rsa-sha2-512,ssh-rsa
KexAlgorithms curve25519-sha256,[email protected],diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc
重启sshd

systemctl restart sshd

刷新Jenkins网页,重新配置密码连接

你可能感兴趣的:(jenkins,ssh,服务器)