jenkins插件 Publish Over SSH 离线下载安装配置

查看Jenkins版本

登录后右下角显示 Jenkins 2.328

离线下载

https://plugins.jenkins.io/

搜索 Publish Over SSH
https://plugins.jenkins.io/publish-over-ssh/releases/

根据版本支持情况下载安装

最新版 Requires Jenkins 2.479.1

Jenkins 2.328 支持1.24版本

具体版本可以查看https://old.stats.jenkins.io/pluginversions/publish-over-ssh.html 有数量代表支持

离线安装

系统管理-->插件管理-->高级-->Deploy Plugin 上传上面下载的hpi文件进行安装

由于插件依赖JSch

JSch 目前密钥方式 只支持RSA key 在高版本ubuntu默认不支持,需要修改ssh配置进行修改

配置

基本配置

密钥生成

复制代码
ssh-keygen -t rsa -b 2048 -m PEM -C "jenkins@ssh" -N ""

将公钥添加到远程机器的 /etc/ssh/sshd_config 文件最后

jenkin页面配置到key

系统管理-->系统配置-->Publish over SSH-->SSH Servers -->高级--Use password authentication, or use a different key-->粘贴到key里

ubuntu 修改

复制代码
sudo nano /etc/ssh/sshd_config

修改这四项 PubkeyAcceptedKeyTypes KexAlgorithms Ciphers PubkeyAuthentication

复制代码
PubkeyAcceptedKeyTypes 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-group14-sha256,diffie-hellman-group14-sha1
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc
PubkeyAuthentication yes

最后重启sshd

复制代码
sudo systemctl restart sshd
相关推荐
XIAOHEZIcode3 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
Web3探索者9 天前
可视化服务器管理和传统命令行区别是什么?新手教程:Linux 运维到底该用图形界面还是 SSH 命令行?
linux·ssh
开发者联盟league16 天前
安装pnpm
ssh
2601_9618752416 天前
决战申论100题2026|最新|范文
linux·容器·centos·debian·ssh·fabric·vagrant
张飞飞飞飞飞16 天前
Tmux命令使用教程
linux·服务器·ubuntu
醉颜凉16 天前
Elasticsearch高性能优化:Bulk API大规模数据导入性能调优全攻略
elasticsearch·性能优化·jenkins
盼小辉丶17 天前
Ubuntu极速部署OpenClaw完全指南(本地模型+DeepSeek)
linux·ubuntu·openclaw
黑白园17 天前
【环境搭建】Ubuntu安装(一)
linux·ubuntu
sbjdhjd17 天前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
Moshow郑锴17 天前
Ubuntu用SDKMAN轻松管理多个Java 版本
java·ubuntu·sdkman