Description: The master machine is Windows, and a Linux machine is configured as a slave. This linux machine is for CentOS.
1, on the Linux slave configuration
① Create a user named Jenkins
#sudo/usr/sbin/useradd-m jenkins-d/home/jenkins
② Set the user Jenkins password
#sudo/usr/bin/passwd Jenkins
Enter a new password and a confirmation password as prompted.
③ Switch to Jenkins user
#su-jenkins
④ Create public/private key pair
#ssh-keygen-t RSA
Note: There are several inquiries in the middle, you can directly enter the return, where: key pair stored in the default/home/jenkins/.ssh directory, the password is empty.
⑤ Create Authorized_keys
#cd/home/jenkins/.ssh
#cat id_rsa.pub > Authorized_keys#chmod authorized_keys
⑥ copy of Id_rsa content
#cd/home/jenkins/.ssh
#cat Id_rsa
Description: Used when configured on the browser.
2, through the browser configuration
Access to the completed Jenkins through the browser.
① Configuration Voucher
"System Management"-> "Manage Credentials"-> "Add Credentials"-> "SSH Username with private key"
② Add and configure nodes
"System Management"-> "Management Node", enter the node name, select "Dump Slave".