问题:jenkins配置ssh远程连接时候报

ERROR: Failed to authenticate with public key

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

com.jcraft.jsch.JSchException: invalid privatekey: [B@5c313ae5

jenkins前端提示:Can't connect to server

原因分析:

  1. 本地机器秘钥生成不对
  2. 必须将本地私钥完整内容拷贝,包括----字符(可能是个bug)
  3. 生成秘钥时候的密码错误

配置步骤:

1. private key必须包含----begin和----end----,否则死活报Can't connect to server

jenkins 配置ssh remotes 报Failed to authenticate with public key 随笔 第1张

2.系统设置里面添加ssh remote

.jenkins 配置ssh remotes 报Failed to authenticate with public key 随笔 第2张

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄