summaryrefslogtreecommitdiff
path: root/vm-data/worker.customize
diff options
context:
space:
mode:
Diffstat (limited to 'vm-data/worker.customize')
-rwxr-xr-xvm-data/worker.customize6
1 files changed, 4 insertions, 2 deletions
diff --git a/vm-data/worker.customize b/vm-data/worker.customize
index b10be59..8053025 100755
--- a/vm-data/worker.customize
+++ b/vm-data/worker.customize
@@ -45,9 +45,11 @@ install -m 0600 vm-data/worker.user-key \
install -m 0644 vm-data/worker.user-key.pub \
"$rootdir/var/lib/jenkins/.ssh/id_rsa.pub"
-# Install the Jenkins user key into Jenkins's allowed_keys file.
-install -m 0600 vm-data/jenkins.user-key.pub \
+# Install an authorized_keys files to allow jenkins on the master node,
+# and on the worker itself, to log in with ssh.
+cat vm-data/jenkins.user-key.pub vm-data/worker.user-key.pub \
"$rootdir/var/lib/jenkins/.ssh/authorized_keys"
+chmod 0600 "$rootdir/var/lib/jenkins/.ssh/authorized_keys"
# Disable ssh host key checking.
echo "StrictHostKeyChecking no" >> "$rootdir/etc/ssh/ssh_config"