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网页,重新配置密码连接
相关推荐
Web3探索者8 天前
可视化服务器管理和传统命令行区别是什么?新手教程:Linux 运维到底该用图形界面还是 SSH 命令行?
linux·ssh
zzzzzz31011 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
大树8815 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai
开发者联盟league15 天前
安装pnpm
ssh
小宇宙Zz15 天前
Maven依赖冲突
java·服务器·maven
古城小栈15 天前
Unix 与 Linux 异同小叙
linux·服务器·unix
程序猿阿伟15 天前
《Chrome离线扩展安装的底层逻辑与场景落地指南》
服务器·网络·chrome
凡人叶枫15 天前
Effective C++ 条款42:了解 typename 的双重意义
java·linux·服务器·c++
AC赳赳老秦15 天前
用 OpenClaw 搭建服务器故障应急响应系统,自动处理 80% 常见运维故障
android·运维·服务器·python·rxjava·deepseek·openclaw
2601_9618752415 天前
决战申论100题2026|最新|范文
linux·容器·centos·debian·ssh·fabric·vagrant