前提:
1、本案例是在VMware安装CentOS7的环境完成的
2、CentOS7已配置java环境
3、CentOS7安装tomcat下启动的jenkins
Jenkins配置节点
ssh-keygen配置证书,三次回车
[root@bogon ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:dOVo3O2Iz9RQ4c/nTdgIjrwznDAUU2S6q/kCS6n8tPs root@bogon
The key's randomart image is:
+---[RSA 2048]----+
| oo+ . o. |
| * = + |
| + = = o |
| o = + * * |
| . S + + = *|
| + = * oo|
| . o.o . * o o|
| o....o o |
| .+oEo. |
+----[SHA256]-----+
ssh连接slave机ip,自动生成known_hosts文件
# 连接slave机ip
[root@bogon ~]# ssh 192.168.111.129
The authenticity of host '192.168.111.129 (192.168.111.129)' can't be established.
ECDSA key fingerprint is SHA256:M5BalHyNXU5W49c5/9iZgC4Hl370O0Wr/c5S/FYFIvw.
ECDSA key fingerprint is MD5:28:23:b8:eb:af:d1:bd:bb:8c:77:e0:01:3c:62:7a:cb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.111.129' (ECDSA) to the list of known hosts.
root@192.168.111.129's password: # 输入登录账户密码
Last login: Wed Jan 5 16:10:37 2022 from bogon
[root@bogon ~]# cd .ssh/
[root@bogon .ssh]

本文讲述了在VMware上安装CentOS7环境中,配置Jenkins并添加SSH节点时遇到的问题,包括ssh-keygen设置、known_hosts文件管理和Java路径确认。详细介绍了如何解决SSH连接验证失败及Java版本检测不成功的问题。
最低0.47元/天 解锁文章
6239

被折叠的 条评论
为什么被折叠?



