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
相关推荐
埃博拉酱3 天前
VS Code Remote SSH 连接 Windows 服务器卡在"下载 VS Code 服务器":prcdn DNS 解析失败的诊断与 BITS 断点续传
windows·ssh·visual studio code
欧云服务器3 天前
怎么让脚本命令可以同时在centos、debian、ubuntu执行?
ubuntu·centos·debian
智渊AI3 天前
Ubuntu 20.04/22.04 下通过 NVM 安装 Node.js 22(LTS 稳定版)
ubuntu·node.js·vim
zhangfeng11333 天前
趋动云 如何ssh登录 服务区 项目server
运维·人工智能·ssh
The️4 天前
Linux驱动开发之Read_Write函数
linux·运维·服务器·驱动开发·ubuntu·交互
再战300年4 天前
Samba在ubuntu上安装部署
linux·运维·ubuntu
qwfys2004 天前
How to install golang 1.26.0 to Ubuntu 24.04
ubuntu·golang·install
木尧大兄弟4 天前
Ubuntu 系统安装 OpenClaw 并接入飞书记录
linux·ubuntu·飞书·openclaw
小虾爬滑丫爬4 天前
ubuntu上设置Tomcat 开机启动
ubuntu·tomcat·开机启动
老师用之于民4 天前
【DAY25】线程与进程通信:共享内存、同步机制及实现方案
linux·c语言·ubuntu·visual studio code