码迷,mamicode.com
首页 > 系统相关 > 详细

jenkins 远程连接linux配置

时间:2018-03-23 13:02:16      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:Jenkins

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 identification has been saved in /home/ubuntu/.ssh/id_rsa.
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:
+---[RSA 2048]----+
| o++ ++++++ |
|=.o = .=.. o . |
|o+ * o . . = . |
| = .. . . o + |
|. o o S + o . |
|+.o o . . o . |
|=oE o . |
|=o. . |
|=+ |
+----[SHA256]-----+

2、将公钥拷贝到authorized_keys
ubuntu@jenkins:~/.ssh$ cat id_rsa.pub >> authorized_keys

3、拷贝公钥到远程主机
ubuntu@jenkins:~$ ssh-copy-id -i root@192.168.3.223

4、配置jenkins的SSH server
点击右上角Jenkins——》菜单“系统管理”——》系统设置——》Publish over SSH
技术分享图片

jenkins 远程连接linux配置

标签:Jenkins

原文地址:http://blog.51cto.com/jonauil/2090230

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!