From be23331bbe58bd76d4b4c4f63588ecb777453ded Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 26 May 2019 12:06:14 +0100 Subject: [PATCH] issue #587: ensure Azure worker has a working SSH configuration --- .ci/prep_azure.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.ci/prep_azure.py b/.ci/prep_azure.py index 5199a87e..5e445844 100755 --- a/.ci/prep_azure.py +++ b/.ci/prep_azure.py @@ -7,6 +7,28 @@ import ci_lib batches = [] +batches += [ + [ + "sudo chown `whoami`: ~", + "chmod u=rwx,g=rx,o= ~", + + "sudo mkdir /var/run/sshd", + "sudo /etc/init.d/ssh start", + + "mkdir -p ~/.ssh", + "chmod u=rwx,go= ~/.ssh", + + "ssh-keyscan -H localhost >> ~/.ssh/known_hosts", + "chmod u=rw,go= ~/.ssh/known_hosts", + + "cat tests/data/docker/mitogen__has_sudo_pubkey.key > ~/.ssh/id_rsa", + "chmod u=rw,go= ~/.ssh/id_rsa", + + "cat tests/data/docker/mitogen__has_sudo_pubkey.key.pub > ~/.ssh/authorized_keys", + "chmod u=rw,go=r ~/.ssh/authorized_keys", + ] +] + if ci_lib.have_apt(): batches.append([ 'echo force-unsafe-io | sudo tee /etc/dpkg/dpkg.cfg.d/nosync',