zoukankan      html  css  js  c++  java
  • jenkins远程连接linux配置测试


    由于配置原因造成一下错误
    错误: jenkins.plugins.publish_over.BapPublisherException: Failed to connect session for config [131]. Message [Auth fail]

    配置方法:

    1、生成密钥
    我的jenkins服务安装在了linux下的jenkins用户下
    [jenkins@jenkins ~]$ ssh-keygen  
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/jenkins/.ssh/id_rsa): //密钥生成路径,直接默认回车即可
    Created directory '/home/jenkins/.ssh'.
    Enter passphrase (empty for no passphrase): //默认回车
    Enter same passphrase again: //默认回车
    Your identification has been saved in /home/jenkins/.ssh/id_rsa.
    Your public key has been saved in /home/jenkins/.ssh/id_rsa.pub.
    The key fingerprint is:
    c0:3d:31:ee:81:b6:5d:5f:d7:83:96:a3:92:85:e0:ab jenkins@jenkins
    2、进入到目录进行查看
    [jenkins@jenkins ~]$ cd .ssh/
    [jenkins@jenkins .ssh]$ ll
    total 8
    -rw-------. 1 jenkins jenkins 1671 Jul 17 23:23 id_rsa
    -rw-r--r--. 1 jenkins jenkins  397 Jul 17 23:23 id_rsa.pub
    3、将公钥拷贝到authorized_keys文件
    [jenkins@jenkins .ssh]$ cat id_rsa.pub >> authorized_keys    
    4、将生成的authorized_keys拷贝到要连接的linux机器上的对应用户下的.ssh文件夹下
    [jenkins@jenkins .ssh]$ scp authorized_keys wqq@192.168.0.91:/home/wqq/.ssh
    The authenticity of host '192.168.0.91 (192.168.0.91)' can't be established.
    RSA key fingerprint is ff:dc:00:df:2c:40:70:63:95:ad:53:85:b7:8a:15:06.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '192.168.0.91' (RSA) to the list of known hosts.
    reverse mapping checking getaddrinfo for bogon [192.168.0.91] failed - POSSIBLE BREAK-IN ATTEMPT!
    wqq@192.168.0.91's password:
    authorized_keys                                                                 100%  397     0.4KB/s   00:00  
    5、配置SSH Server 左上角的jenkins-->系统管理-->系统设置

    完成填写之后点击右下角的Test Configuration按钮测试即可




  • 相关阅读:
    ZOJ 3876 May Day Holiday 蔡勒公式
    ZOJ 3870 Team Formation 贪心二进制
    ZOJ 3872 计算对答案的贡献
    Codeforces Round #324 (Div. 2)C. Marina and Vasya set
    Jquery前端分页插件pagination使用
    最简单的混合开发教程资料汇总
    最简单的混合开发教程资料汇总
    2018年各大互联网前端面试题二(滴滴打车)
    2018年各大互联网前端面试题二(滴滴打车)
    【福利】小程序开发资源干货汇总
  • 原文地址:https://www.cnblogs.com/wangqianqiannb/p/7200791.html
Copyright © 2011-2022 走看看