From a01877a4d9e71894b2a830760ed653ba6e05a712 Mon Sep 17 00:00:00 2001 From: konkourgr Date: Wed, 13 Dec 2023 15:21:53 +0200 Subject: [PATCH] Add ssh pubkeys and fix ssh package installation --- Dockerfile | 2 +- gunet/authorized_keys | 2 ++ gunet/custom_script.sh | 2 +- gunet/internal_custom_script.sh | 2 +- gunet/preseed.cfg | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 gunet/authorized_keys diff --git a/Dockerfile b/Dockerfile index cb21ed3..7ca3183 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,4 +62,4 @@ ENV NET_DOMAIN="notset" ENV ROOT_PASSWORD="notset" -ENTRYPOINT [ "/var/jeos/mkiso.sh" ] \ No newline at end of file +ENTRYPOINT [ "/var/jeos/mkiso.sh" ] diff --git a/gunet/authorized_keys b/gunet/authorized_keys new file mode 100644 index 0000000..723a8ea --- /dev/null +++ b/gunet/authorized_keys @@ -0,0 +1,2 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6cM+nOljtfvEn0BUYrJ9G5487HuaYGBrLikQfo1ZI5nfptVB1aOpJAQk77CTkS4uYnf705w9x3PO+Cv0N+bT4iVyrc8I6ZCBBdu607FCXi28H8WLVQdO9AptOZsa0DUFjq1Up71y8t2EdrQKlcHgKEUeoiimWL034KXzc/eFkAbqpYcS+iQUyb08KtJLk49nRXWznYlhJ0aGRrGXlKdgm4o9peQQhRct3NEviDVfS8x5eBmHlRnPz7hxCSNe63qx/zLVarR6ASAKLs595s/4IHj2HtaOVYiaK0iZZrPyhZlTgfxHsTw76oglEMj5OeqFNZzIEQ+XcI0uZJ4vi6dqLQ== kkalev +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDk6T7kZgQM0e1EGRIAmQH5DZgykaXW2CCtuU8az5elK7bdgnHMoxpNmrC0vun+Oh9D8RLlwnYG+HGyFF7V+iXqcLyesQtmdofsnkZAvp/hYIavGvcbBuwK0AaPtf3/n4IcStGNAZfZMX7g5V3d/loCLRZwhHdL0ih0PneOPNCLDpXkPVcVVaT1VnTVIcmS5y6ZHl83h0SRiqbAuygGAKLBWrKKpGxjbMVgQ2sbVmUpUpbtsOaeOB1vXg3Qef+Ykqh04YS2DeAdLRaSr6ls3So2ElQKERSLP4jZoJP9Sl8TcM6A1BgDnORQlCjuuZstxmXtBoSeXty/XBjyClrcVEyD konkour@uoa diff --git a/gunet/custom_script.sh b/gunet/custom_script.sh index 12a92b6..82fda31 100644 --- a/gunet/custom_script.sh +++ b/gunet/custom_script.sh @@ -4,7 +4,7 @@ systemctl enable acpid.service sed -i "/Port 22/aPort 65432" /etc/ssh/sshd_config -#rm -r /var/log/installer; +rm -r /var/log/installer; exit 0; diff --git a/gunet/internal_custom_script.sh b/gunet/internal_custom_script.sh index 31e5379..a14df06 100644 --- a/gunet/internal_custom_script.sh +++ b/gunet/internal_custom_script.sh @@ -17,7 +17,7 @@ apt-get -y --purge autoremove apt-get -y install acpi-support-base openssh-server \ iptables-persistent deborphan anacron net-tools \ - wget telnet tcpdump lsof ping cdebconf + wget telnet tcpdump lsof cdebconf apt-get -y update apt-get -y upgrade diff --git a/gunet/preseed.cfg b/gunet/preseed.cfg index 83de6d0..86da046 100644 --- a/gunet/preseed.cfg +++ b/gunet/preseed.cfg @@ -75,4 +75,4 @@ d-i grub-installer/bootdev string default d-i finish-install/reboot_in_progress note -d-i preseed/late_command string cp /cdrom/gunet/custom_script.sh /target/root; cp /cdrom/gunet/internal_custom_script.sh /target/root/; cp /cdrom/gunet/sources.list /target/etc/apt/; cp /cdrom/gunet/00norecommends /target/etc/apt/apt.conf.d; cp /cdrom/gunet/install_docker.sh /target/root/; in-target apt-get -y update; cp /cdrom/gunet/disableipv6.conf /target/etc/sysctl.d; cp /cdrom/gunet/locale /target/etc/default;in-target chmod 700 /root/custom_script.sh; in-target chmod 700 /root/internal_custom_script.sh; in-target /root/internal_custom_script.sh; in-target /root/custom_script.sh; in-target chmod 700 /root/install_docker.sh; in-target /root/install_docker.sh; in-target rm /root/custom_script.sh; in-target rm /root/internal_custom_script.sh; in-target rm /root/install_docker.sh; +d-i preseed/late_command string cp /cdrom/gunet/custom_script.sh /target/root; cp /cdrom/gunet/internal_custom_script.sh /target/root/; cp /cdrom/gunet/sources.list /target/etc/apt/; cp /cdrom/gunet/00norecommends /target/etc/apt/apt.conf.d; cp /cdrom/gunet/install_docker.sh /target/root/; in-target apt-get -y update; cp /cdrom/gunet/disableipv6.conf /target/etc/sysctl.d; cp /cdrom/gunet/locale /target/etc/default;in-target chmod 700 /root/custom_script.sh; in-target chmod 700 /root/internal_custom_script.sh; in-target /root/internal_custom_script.sh; in-target mkdir /target/root/.ssh; cp /cdrom/gunet/authorized_keys /target/root/.ssh/; in-target /root/custom_script.sh; in-target chmod 700 /root/install_docker.sh; in-target /root/install_docker.sh; in-target rm /root/custom_script.sh; in-target rm /root/internal_custom_script.sh; in-target rm /root/install_docker.sh;