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

将文件中对应的行更换为下面的数据

shell 复制代码
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512,ssh-rsa
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc
重启sshd

systemctl restart sshd

刷新Jenkins网页,重新配置密码连接
相关推荐
又是忙碌的一天19 小时前
SpringMVC响应
java·服务器·数据库
FOREVER-Q19 小时前
Windows 下通过 SSH 替代 Gitee OAuth Token 推送配置指南
运维·服务器
ba_pi20 小时前
每天写点什么2026-01-09-linux基础
linux·运维·服务器
少云清20 小时前
【性能测试】3_性能测试基础 _指标
运维·服务器·数据库·性能测试·性能测试指标
行走的bug...20 小时前
cmake总结
linux·运维·服务器
凌波粒21 小时前
Linux 面试题篇
linux·运维·服务器
虾..21 小时前
Linux 线程控制
linux·运维·服务器
镜中人★21 小时前
408操作系统考纲知识点
linux·运维·服务器
liulilittle21 小时前
rinetd 端口转发工具技术原理
linux·服务器·网络·c++·端口·通信·转发
cnstartech21 小时前
esxi-vmware 虚拟机互相打开
linux·运维·服务器