fix errors on local image

This commit is contained in:
Tobias Powalowski 2024-06-01 16:53:18 +02:00
parent f0117f5b5f
commit d5974cdbd2

View file

@ -12,13 +12,15 @@ _run ()
/usr/lib/ssh/{sftp-server,ssh-keysign,ssh-pkcs11-helper} /usr/lib/ssh/{sftp-server,ssh-keysign,ssh-pkcs11-helper}
mkdir -p "${_ROOTFS}"/root/.ssh mkdir -p "${_ROOTFS}"/root/.ssh
# add ssh key # add ssh key
_file_rename /etc/archboot/ssh/archboot-key.pub /root/.ssh/authorized_keys
if [[ -f /etc/archboot/ssh/archboot-key ]]; then if [[ -f /etc/archboot/ssh/archboot-key ]]; then
_file_rename /etc/archboot/ssh/archboot-key /root/.ssh/archboot-key _file_rename /etc/archboot/ssh/archboot-key /root/.ssh/archboot-key
_file /etc/archboot/ssh/archboot-key _file /etc/archboot/ssh/archboot-key
fi fi
if [[ -f /etc/archboot/ssh/archboot-key.pub ]]; then
_file_rename /etc/archboot/ssh/archboot-key.pub /root/.ssh/authorized_keys
_file_rename /etc/archboot/ssh/archboot-key.pub /root/.ssh/archboot-key.pub _file_rename /etc/archboot/ssh/archboot-key.pub /root/.ssh/archboot-key.pub
_file /etc/archboot/ssh/archboot-key.pub _file /etc/archboot/ssh/archboot-key.pub
fi
# switch port to ARCH and disable password login # switch port to ARCH and disable password login
_file_rename /etc/ssh/sshd_config /etc/ssh/sshd_config _file_rename /etc/ssh/sshd_config /etc/ssh/sshd_config
echo "Port 11838" >> ${_ROOTFS}/etc/ssh/sshd_config echo "Port 11838" >> ${_ROOTFS}/etc/ssh/sshd_config