ETA: 10 mins Slave Machine # init: [Slave] Create Account for Autobuild slave:~$ sudo adduser jing_autobuild
# Step 1: Create private key and public key
slave:~$ ssh-keygen -t rsa -C "The access key for the slave Jing" (note: Enter passphrase) Output: private key: id_rsa # copy to master public key: id_rsa.pub # copy to slave (.ssh/authorized_keys)
Detail Step 1: Create private key and public key (detail)
You are on slave machine
slave:~$ ssh-keygen -t rsa -C "The access key for the slave Jing" Output: private key: id_rsa # for jenkins master to connect this slave public key: id_rsa.pub # for this slave to verify the connection from jenkins master Note: You should enter a strong passphrase for your key. If you do not use passphrase, anyone can commit your codes when the keys were stolen. example: Step 2: Setup the public key as the authorized key for verifying the credential key from the master
Username: the username for access the slave machine Key: copy private key Step 1: cat the private key from the slave machine ex: # you are on the slave slave:~$ cd .ssh;cat id_rsa
Step 2: copy the content to the jenkins master board