From f82d58b59ec8a6f28ec5a78d5399d0871cca27dc Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 23 May 2025 13:08:06 +0300 Subject: [PATCH 1/7] Try to use SSH key --- spread.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spread.yaml b/spread.yaml index 8e1352e7b3..731e05d455 100644 --- a/spread.yaml +++ b/spread.yaml @@ -74,10 +74,8 @@ backends: # each spread job & select a single job when running spread) # Derived from https://github.com/jnsgruk/zinc-k8s-operator/blob/a21eae8399eb3b9df4ddb934b837af25ef831976/spread.yaml#L47 allocate: | - sudo tee /etc/ssh/sshd_config.d/10-spread-github-ci.conf << 'EOF' - PasswordAuthentication yes - PermitEmptyPasswords yes - EOF + ssh-keygen -t ecdsa -b 256 -N "" + cp ~/.ssh/id_ecdsa.pub ~/.ssh/authorized_keys ADDRESS localhost # HACK: spread does not pass environment variables set on runner From e27d1a07e71eeba1d46719052a7abd7e6d515b8f Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 23 May 2025 13:16:30 +0300 Subject: [PATCH 2/7] Set key location --- spread.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spread.yaml b/spread.yaml index 731e05d455..f0c64806f9 100644 --- a/spread.yaml +++ b/spread.yaml @@ -74,7 +74,7 @@ backends: # each spread job & select a single job when running spread) # Derived from https://github.com/jnsgruk/zinc-k8s-operator/blob/a21eae8399eb3b9df4ddb934b837af25ef831976/spread.yaml#L47 allocate: | - ssh-keygen -t ecdsa -b 256 -N "" + ssh-keygen -t ecdsa -b 256 -N "" -f ~/.ssh/id_ecdsa cp ~/.ssh/id_ecdsa.pub ~/.ssh/authorized_keys ADDRESS localhost From c88e312f7977667ae5923c475ac5cbeb8639b702 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 23 May 2025 13:27:51 +0300 Subject: [PATCH 3/7] Allow pubkey auth --- spread.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spread.yaml b/spread.yaml index f0c64806f9..7c6ef730ad 100644 --- a/spread.yaml +++ b/spread.yaml @@ -74,6 +74,11 @@ backends: # each spread job & select a single job when running spread) # Derived from https://github.com/jnsgruk/zinc-k8s-operator/blob/a21eae8399eb3b9df4ddb934b837af25ef831976/spread.yaml#L47 allocate: | + sudo tee /etc/ssh/sshd_config.d/10-spread-github-ci.conf << 'EOF' + PasswordAuthentication no + AuthenticationMethods publickey + EOF + ssh-keygen -t ecdsa -b 256 -N "" -f ~/.ssh/id_ecdsa cp ~/.ssh/id_ecdsa.pub ~/.ssh/authorized_keys From 82f38a3ad34af563fd753487eb99940ea2b96f4d Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 23 May 2025 13:50:32 +0300 Subject: [PATCH 4/7] Try to set keys perm --- spread.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spread.yaml b/spread.yaml index 7c6ef730ad..d823167d9f 100644 --- a/spread.yaml +++ b/spread.yaml @@ -81,6 +81,9 @@ backends: ssh-keygen -t ecdsa -b 256 -N "" -f ~/.ssh/id_ecdsa cp ~/.ssh/id_ecdsa.pub ~/.ssh/authorized_keys + sudo chown runner:runner /home/runner/.ssh/authorized_keys + chmod 700 ~/.ssh + chmod 600 ~/.ssh/authorized_keys ADDRESS localhost # HACK: spread does not pass environment variables set on runner From eb3d86a2324cb9c255226d769fc544a1acc2d23d Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 23 May 2025 13:58:21 +0300 Subject: [PATCH 5/7] Try to change the pass --- spread.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/spread.yaml b/spread.yaml index d823167d9f..731d221262 100644 --- a/spread.yaml +++ b/spread.yaml @@ -75,15 +75,10 @@ backends: # Derived from https://github.com/jnsgruk/zinc-k8s-operator/blob/a21eae8399eb3b9df4ddb934b837af25ef831976/spread.yaml#L47 allocate: | sudo tee /etc/ssh/sshd_config.d/10-spread-github-ci.conf << 'EOF' - PasswordAuthentication no - AuthenticationMethods publickey + PasswordAuthentication yes EOF - ssh-keygen -t ecdsa -b 256 -N "" -f ~/.ssh/id_ecdsa - cp ~/.ssh/id_ecdsa.pub ~/.ssh/authorized_keys - sudo chown runner:runner /home/runner/.ssh/authorized_keys - chmod 700 ~/.ssh - chmod 600 ~/.ssh/authorized_keys + sudo passwd runner -s < 'qweqwe' ADDRESS localhost # HACK: spread does not pass environment variables set on runner @@ -100,8 +95,10 @@ backends: systems: - ubuntu-24.04: username: runner + password: qweqwe - ubuntu-24.04-arm: username: runner + password: qweqwe suites: tests/spread/: From 88f72ec0082c5a428c334b676ccfc68d50231f25 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 23 May 2025 14:09:47 +0300 Subject: [PATCH 6/7] Try to set pass --- spread.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spread.yaml b/spread.yaml index 731d221262..aed6a7240d 100644 --- a/spread.yaml +++ b/spread.yaml @@ -78,7 +78,7 @@ backends: PasswordAuthentication yes EOF - sudo passwd runner -s < 'qweqwe' + echo "qweqwe" | sudo passwd -s runner ADDRESS localhost # HACK: spread does not pass environment variables set on runner From d4c7031820c3a1485cfc6256f4dc0ebe684789a5 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 23 May 2025 14:26:43 +0300 Subject: [PATCH 7/7] Try to delete pass --- spread.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spread.yaml b/spread.yaml index aed6a7240d..fe01ada361 100644 --- a/spread.yaml +++ b/spread.yaml @@ -76,9 +76,10 @@ backends: allocate: | sudo tee /etc/ssh/sshd_config.d/10-spread-github-ci.conf << 'EOF' PasswordAuthentication yes + PermitEmptyPasswords yes EOF - echo "qweqwe" | sudo passwd -s runner + sudo passwd -d runner ADDRESS localhost # HACK: spread does not pass environment variables set on runner @@ -95,10 +96,8 @@ backends: systems: - ubuntu-24.04: username: runner - password: qweqwe - ubuntu-24.04-arm: username: runner - password: qweqwe suites: tests/spread/: