X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=pipelines%2Fimages%2Fimagebuild.sh;h=befc9bf0fb2f1e302b0901f486f9246c686b71ae;hb=2945663087a01c58773d3969cf6da2ddb7aeaaea;hp=45632c0514c365dd0811a5eac196c5c5158825c8;hpb=3c575b840975946dc559c4be1fc998dd57bc6e23;p=lttng-ci.git diff --git a/pipelines/images/imagebuild.sh b/pipelines/images/imagebuild.sh index 45632c0..befc9bf 100644 --- a/pipelines/images/imagebuild.sh +++ b/pipelines/images/imagebuild.sh @@ -173,6 +173,10 @@ CLEANUP+=( "rm -f ${HOME}/.ssh/id_rsa" ) lxc file push ~/.ssh/id_rsa.pub "ci:${INSTANCE_NAME}/root/.ssh/authorized_keys2" +# Some distros, eg. Rocky Linux, don't enable the use of authorized_keys2 +# by default +lxc exec "ci:${INSTANCE_NAME}" -- bash -c 'if test -f /etc/redhat-release ; then sed -i "s#^AuthorizedKeysFile.*#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2#" /etc/ssh/sshd_config ; systemctl restart sshd ; fi' + # Confirm working SSH connection if ! ssh "${INSTANCE_IP}" hostname ; then