SSH Key scan failed trying to build custom Docker under Bullseye

Hardware: Raspberry PI 4 with 8Gb Ram
OS: PI OS Bullseye Full distribution
All updates to Bullseye done
Docker standard image : 2.1.3 is running OK
Docker Custom Git freshly clone.
I was able to build several Custom Docker Node-red images under PI OS Buster.
The final lines of the log are:
ssh-keyscan failed, no more retries left
The command '/bin/sh -c ./known_hosts.sh /etc/ssh/ssh_known_hosts && rm /usr/src/node-red/known_hosts.sh' returned a non-zero code: 1


#########################################################################
node-red version: 2.1.3
#########################################################################
Sending build context to Docker daemon  288.3kB
Step 1/27 : ARG ARCH=arm32v7
Step 2/27 : ARG NODE_VERSION=12
Step 3/27 : ARG OS=alpine
Step 4/27 : FROM ${ARCH}/node:${NODE_VERSION}-${OS} AS base
 ---> ef89f71a1932
Step 5/27 : COPY scripts/*.sh /tmp/
 ---> 14c8d578a4a0
Step 6/27 : RUN set -ex &&     apk add --no-cache         bash         tzdata         iputils         curl         nano         git         openssl         openssh-client         ca-certificates &&     mkdir -p /usr/src/node-red /data &&     deluser --remove-home node &&     adduser -h /usr/src/node-red -D -H node-red -u 1000 &&     chown -R node-red:root /data && chmod -R g+rwX /data &&     chown -R node-red:root /usr/src/node-red && chmod -R g+rwX /usr/src/node-red
 ---> Running in fd04fbe23f0b
+ apk add --no-cache bash tzdata iputils curl nano git openssl openssh-client ca-certificates
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/armv7/APKINDEX.tar.gz
(1/22) Installing ncurses-terminfo-base (6.2_p20210612-r0)
(2/22) Installing ncurses-libs (6.2_p20210612-r0)
(3/22) Installing readline (8.1.0-r0)
(4/22) Installing bash (5.1.4-r0)
Executing bash-5.1.4-r0.post-install
(5/22) Installing ca-certificates (20191127-r5)
(6/22) Installing brotli-libs (1.0.9-r5)
(7/22) Installing nghttp2-libs (1.43.0-r0)
(8/22) Installing libcurl (7.79.1-r0)
(9/22) Installing curl (7.79.1-r0)
(10/22) Installing expat (2.4.1-r0)
(11/22) Installing pcre2 (10.36-r0)
(12/22) Installing git (2.32.0-r0)
(13/22) Installing libcap (2.50-r0)
(14/22) Installing iputils (20210202-r0)
(15/22) Installing libmagic (5.40-r1)
(16/22) Installing nano (5.7-r2)
(17/22) Installing openssh-keygen (8.6_p1-r3)
(18/22) Installing libedit (20210216.3.1-r0)
(19/22) Installing openssh-client-common (8.6_p1-r3)
(20/22) Installing openssh-client-default (8.6_p1-r3)
(21/22) Installing openssl (1.1.1l-r0)
...
...
...
Step 9/27 : RUN ./known_hosts.sh /etc/ssh/ssh_known_hosts && rm /usr/src/node-red/known_hosts.sh
 ---> Running in 014768671f13
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 1ea5b1a670f6
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 a850b9848fdd
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 27c69e8a7237
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 5342984440a5
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 66e2e6157c88
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# source.developers.google.com:2022 SSH-2.0-Go
# source.developers.google.com:2022 SSH-2.0-Go
# source.developers.google.com:2022 SSH-2.0-Go
# source.developers.google.com:2022 SSH-2.0-Go
# source.developers.google.com:2022 SSH-2.0-Go

+++ /tmp/tmp.cGLBCn
@@ -3,6 +3,8 @@
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og ssh.dev.azure.com (RSA)
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og vs-ssh.visualstudio.com (RSA)
 2048 SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A bitbucket.org (RSA)
+256 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU github.com (ED25519)
 256 SHA256:AGvEpqYNMqsRNIviwyk4J4HM0lEylomDBKOWZsBn434 [source.developers.google.com]:2022 (ECDSA)
 256 SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw gitlab.com (ECDSA)
 256 SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8 gitlab.com (ED25519)
+256 SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM github.com (ECDSA)
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# github.com:22 SSH-2.0-babeld-a73e1397
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# gitlab.com:22 SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 1ea5b1a670f6
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 282cff4580c6
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 e29a3b52f441
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 fce8ee8baf90
# bitbucket.org:22 SSH-2.0-conker_a7531beec7 d963fff1a592

--- -
--- -
+++ /tmp/tmp.cGLBCn
@@ -3,6 +3,8 @@
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og ssh.dev.azure.com (RSA)
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og vs-ssh.visualstudio.com (RSA)
 2048 SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A bitbucket.org (RSA)
+256 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU github.com (ED25519)
 256 SHA256:AGvEpqYNMqsRNIviwyk4J4HM0lEylomDBKOWZsBn434 [source.developers.google.com]:2022 (ECDSA)
 256 SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw gitlab.com (ECDSA)
 256 SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8 gitlab.com (ED25519)
+256 SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM github.com (ECDSA)
ssh-keyscan failed, no more retries left
The command '/bin/sh -c ./known_hosts.sh /etc/ssh/ssh_known_hosts && rm /usr/src/node-red/known_hosts.sh' returned a non-zero code: 1

Not really a node-red question though is it?

Maybe try in a docker forum?

It is part of our custom script so belongs here
@hardillb ?

It shouldn't care which OS it's run on as it should be running in the Alpine container while it's being built.

from the Flux project (flux/docker at master · fluxcd/flux · GitHub)

There are 2 new keys for Github

2048 SHA256:ROQFvPThGrW4RuWLoL9tq9I9zJ42fK4XywyRtbOz/EQ gitlab.com (RSA)
2048 SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 github.com (RSA)
2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og ssh.dev.azure.com (RSA)
2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og vs-ssh.visualstudio.com (RSA)
2048 SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A bitbucket.org (RSA)
256 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU github.com (ED25519)
256 SHA256:AGvEpqYNMqsRNIviwyk4J4HM0lEylomDBKOWZsBn434 [source.developers.google.com]:2022 (ECDSA)
256 SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw gitlab.com (ECDSA)
256 SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8 gitlab.com (ED25519)
256 SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM github.com (ECDSA)

yeah, just need to add the 2 extra lines in. PR in the works

Changes merged, Please pull the latest and test

1 Like

Thanks for your help !

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.