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
相关推荐
wypywyp6 小时前
8. ubuntu 虚拟机 linux 服务器 TCP/IP 概念辨析
linux·服务器·ubuntu
阿蒙Amon6 小时前
TypeScript学习-第10章:模块与命名空间
学习·ubuntu·typescript
No8g攻城狮7 小时前
【Linux】Windows11 安装 WSL2 并运行 Ubuntu 22.04 详细操作步骤
linux·运维·ubuntu
森G10 小时前
七、04ledc-sdk--------makefile有变化
linux·c语言·arm开发·c++·ubuntu
生活很暖很治愈13 小时前
Linux——孤儿进程&进程调度&大O(1)调度
linux·服务器·ubuntu
getapi15 小时前
注塑件的费用构成
linux·服务器·ubuntu
lucky-billy16 小时前
Ubuntu 下一键部署 ROS2
linux·ubuntu·ros2
阿梦Anmory16 小时前
Ubuntu配置代理最详细教程
linux·运维·ubuntu
getapi17 小时前
Ubuntu 22.04 服务器的系统架构是否为 amd64 x86_64
linux·服务器·ubuntu
小天源17 小时前
Cacti在Debian/Ubuntu中安装及其使用
运维·ubuntu·debian·cacti