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网页,重新配置密码连接
相关推荐
BreezeJiang11 小时前
从域名到 Node.js:一次云服务器请求经过了哪些层?
服务器
Julien20041 天前
调查和解决 SELinux 问题
linux·运维·服务器·网络·学习方法
2601_962074681 天前
自己编译RustDesk,并将自建ID服务器和key信息写入客户端
运维·服务器
大模型丫丫1 天前
Hermes Agent:轻量级智能体框架实战指南
大数据·运维·服务器
mooooooooooye1 天前
2026 年跨平台 SSH 客户端怎么选?Xterminal、Termius、MobaXterm 谁更合适
服务器·网络·ssh
Blockchina1 天前
Codex 实战:从一句需求到可验收的 Linux 主机巡检脚本
运维·服务器·网络
Best-Wishes1 天前
BurpSuite Pro教育版在linux系统中配置
linux·运维·服务器·网络安全·burpsuite
Java后端的Ai之路1 天前
14、Python - 责任链模式
服务器·开发语言·人工智能·python·责任链模式
从入门到退休1 天前
企业远程控制选型:向日葵SDK vs RustDesk自建,谁是更务实的选择?
运维·服务器·网络·远程工作·远程控制
小王C语言1 天前
Windows 无法使用 ssh 连接虚拟机(ubuntu),网络没问题的情况下
运维·ssh