jenkins 远程连接linux配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jenkins 远程连接linux配置相关的知识,希望对你有一定的参考价值。

1、Jenkins主机密钥生成:
[email protected]:~$ 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 [email protected]
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
[email protected]:~/.ssh$ cat id_rsa.pub >> authorized_keys

3、拷贝公钥到远程主机
[email protected]:~$ ssh-copy-id -i [email protected]

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

以上是关于jenkins 远程连接linux配置的主要内容,如果未能解决你的问题,请参考以下文章

Jenkins执行远程Linux系统的shell命令

如何在没有远程桌面连接的 jenkins windows slave 上运行 GUI 测试?

jenkins远程执行shell

Linux下远程桌面连接vnc配置

Linux远程连接介绍及相关配置

linux的VPS远程图形连接问题