lilingjie2015 发表于 2018-9-3 11:17:49

jenkins 远程连接linux配置

  1、Jenkins主机密钥生成:
  ubuntu@jenkins:~$ ssh-keygen -t rsa
  Generating public/private rsa key pair.
  Enter file in which to save the key (/home/ubuntu/.ssh/id_rsa):
  Created directory '/home/ubuntu/.ssh'.
  Enter passphrase (empty for no passphrase):
  Enter same passphrase again:

  Your>  Your public key has been saved in /home/ubuntu/.ssh/id_rsa.pub.
  The key fingerprint is:
  SHA256:SlT+XQJE3mkvMioUEVSWiAmkSJ58QT7p5JoIi4ucynA ubuntu@jenkins
  The key's randomart image is:
  +-------+
  | o++ ++++++      |
  |=.o = .=.. o .   |
  |o+ *o . . = .|
  |= .. . . o +   |
  |.oo S + o .|
  |+.oo . . o .   |
  |=oE   o .      |
  |=o.    .         |
  |=+               |
  +---------+
  2、将公钥拷贝到authorized_keys

  ubuntu@jenkins:~/.ssh$ cat>  3、拷贝公钥到远程主机
  ubuntu@jenkins:~$ ssh-copy-id -i root@192.168.3.223
  4、配置jenkins的SSH server
  点击右上角Jenkins——》菜单“系统管理”——》系统设置——》Publish over SSH


页: [1]
查看完整版本: jenkins 远程连接linux配置