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
相关推荐
Ujimatsu16 小时前
虚拟机安装Debian 13.x及其常用软件(2026.4)
linux·运维·ubuntu
拾贰_C18 小时前
【Agent | openai | Streaming | 】流式输出Streaming
ubuntu·面试·prompt
刘延林.21 小时前
win11系统下通过 WSL2 安装Ubuntu 24.04 使用RTX 5080 GPU
linux·运维·ubuntu
羑悻的小杀马特1 天前
零成本搞定!异地访问 OpenClaw 最简方案:SSH 端口映射组网!
运维·服务器·人工智能·docker·自动化·ssh·openclaw
用户34268877621961 天前
Agent + Ollama 部署踩坑记录
ubuntu
宁波阿成1 天前
在ubuntu22.04源码级安装sub2api
linux·运维·ubuntu·ai·api·token·中转站
为美好的生活献上中指1 天前
本地虚拟机部署redis集群
前端·redis·ubuntu·bootstrap·html·redis集群
一叶龙洲1 天前
Ubuntu开机无法用向日葵远程控制
linux·运维·ubuntu
我是谁??1 天前
ubuntu22.04 + 驱动570.211.01 + cuda12.8
ubuntu·raid