linux - Jenkins slave 设置 - master 和 slave 节点都是 Linux 机器

标签 linux jenkins ssh

我想设置一个 Linux 节点作为 Jenkins 主节点的从属节点。我正在浏览 the tutorial为 Linux 机器设置它。

Have master launch slave agent via SSH

Jenkins has a built-in SSH client implementation that it can use to talk to remote sshd and start a slave agent. This is the most convenient and preferred method for Unix slaves, which normally has sshd out-of-the-box. Click Manage Jenkins, then Manage Nodes, then click "New Node." In this set up, you'll supply the connection information (the slave host name, user name, and ssh credential). Note that the slave will need the master's public ssh key copied to ~/.ssh/authorized_keys.

当它说 ~/.ssh/authorized_keys 是否意味着我需要在以 jenkins 用户身份登录时在节点上的这个位置拥有公钥(Master 用来登录 Slave 的用户名)?

~ 是什么意思?我们谈论的是哪个用户的主目录?

最佳答案

准确来说,

  • 要复制的公钥是运行master的用户的公钥
  • 目的地是从站用户的 .ssh/authorized_keys 文件(即,您为 Jenkins 节点配置上的 ssh 连接选择其凭据的用户页)。

~ 字符被大多数 shell 扩展到当前用户的主目录(例如,/home/userxyz)。

关于linux - Jenkins slave 设置 - master 和 slave 节点都是 Linux 机器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38628321/

相关文章:

java - 如何配置 Jenkins 使用 Maven 进行构建?

linux - Boost.Python 快速入门失败

linux - "nothing to commit (working directory clean)"添加文件夹时

jenkins - 如何在 Jenkins 声明性管道脚本 block 内循环分配 env

amazon-web-services - 在Jenkins中的Docker容器中运行命令

macos - Docker-OS X将localhost 22端口转发到容器2022端口

Python easy_install 给出 [errno13]

ssh - 在终端中保留 tmux 回滚 (iTerm2)

c - 了解进程内存的 shmat 和附件?

c++ - 连接 OpenCV 时对 SGILL 进行编程