diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-09-17 14:13:02 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-09-17 14:13:02 +0200 |
commit | ac7d593a6028d724d20b24a6da17e856a7a8a5fe (patch) | |
tree | 8ea19122f428cdd64a8a7da9e27127d6a68baed0 /sbin | |
parent | f9ad731773438698cdb5171b7fe33ba5a59486d6 (diff) | |
download | itzks-systems-ac7d593a6028d724d20b24a6da17e856a7a8a5fe.tar.gz itzks-systems-ac7d593a6028d724d20b24a6da17e856a7a8a5fe.tar.bz2 itzks-systems-ac7d593a6028d724d20b24a6da17e856a7a8a5fe.zip |
sbin/itzks-update-disklserver-squashfs-images: Copy disklserver's /root/.ssh/known_hosts (or known_hosts.DLW into a freshly copied chroot if not already present). Required for SSH access to debian-edu@tjener.intern to obtain krb5.keytab files.HEADmaster
Diffstat (limited to 'sbin')
-rwxr-xr-x | sbin/itzks-update-disklserver-squashfs-images | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sbin/itzks-update-disklserver-squashfs-images b/sbin/itzks-update-disklserver-squashfs-images index 966484b..b0438a1 100755 --- a/sbin/itzks-update-disklserver-squashfs-images +++ b/sbin/itzks-update-disklserver-squashfs-images @@ -138,6 +138,17 @@ for chroot in ${ltsp_chroots}; do done + # Copy an appropriate SSH known_hosts key file DLWs to ${LTSP_OPT}/${chroot}/root/.ssh/known_hosts. + # Currently we prefer disklserver:/root/.ssh/known_hosts.DLW and fall back to the host's known_hosts file + # (i.e. disklserver:/root/.ssh/known_hosts). + if [ -e "/root/.ssh/known_hosts.DLW" ] && [ ! -e "${LTSP_OPT}/${chroot}/root/.ssh/known_hosts" ]; then + mkdir -p "${LTSP_OPT}/${chroot}/root/.ssh/" + cp "/root/.ssh/known_hosts.DLW" "${LTSP_OPT}/${chroot}/root/.ssh/" + elif [ -e "/root/.ssh/known_hosts" ] && [ ! -e "${LTSP_OPT}/${chroot}/root/.ssh/known_hosts" ]; then + mkdir -p "${LTSP_OPT}/${chroot}/root/.ssh/" + cp "/root/.ssh/known_hosts" "${LTSP_OPT}/${chroot}/root/.ssh/" + fi + # Copy the host's SSH host keys to the LTSP client chroot if it doesn't have any host keys host_keys="$(find /etc/ssh/ssh_host_*)" if [ -n "${host_keys}" ]; then |