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
相关推荐
深念Y1 小时前
Windows 11 工具链部署与 SSH 踩坑笔记
windows·笔记·ssh
mooooooooooye2 天前
2026 年跨平台 SSH 客户端怎么选?Xterminal、Termius、MobaXterm 谁更合适
服务器·网络·ssh
小王C语言2 天前
Windows 无法使用 ssh 连接虚拟机(ubuntu),网络没问题的情况下
运维·ssh
玖石书2 天前
Ubuntu 更换 USTC 镜像源完整指南(AMD64 / AARCH64)
linux·运维·ubuntu
牢姐与蒯2 天前
Linux进程(五).之环境变量
linux·运维·服务器·ubuntu
黑臂麒麟2 天前
Harmony鸿蒙实战应用4:随手账本——编辑与删除账单
ubuntu·华为·鸿蒙
Sayai2 天前
Elasticsearch 快照备份到 NAS(NFS)实战:SLM 自动化 + 365 天保留策略
elasticsearch·自动化·jenkins
玖石书2 天前
WSL2 手动安装 Ubuntu 24.04 到指定磁盘位置
linux·运维·ubuntu·wsl
冰雪青松3 天前
Ubuntu 运维命令大全:从入门到精通的实战参考手册
运维·服务器·ubuntu
mooooooooooye3 天前
SSH 工具越用越乱,Xterminal 先清掉这三类失效连接
运维·ssh·github