summaryrefslogtreecommitdiff
path: root/vm-data
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-12-16 10:48:24 +0000
committerLars Wirzenius <liw@liw.fi>2012-12-16 10:48:24 +0000
commitb12351e281963c6d186c354502654840b323991e (patch)
tree61cbad61b779a121d5aa70f2153e860fe488c4d4 /vm-data
parenta3a99d3d3d167a2ff0d19e7d1f019ad6e53c6e27 (diff)
downloadjenkinstool-b12351e281963c6d186c354502654840b323991e.tar.gz
Install worker's ssh key into its own authorized_keys
This is needed for Obnam's full test suite.
Diffstat (limited to 'vm-data')
-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"