Skip to content

Commit

Permalink
update: support for ssh authorized keys, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kkalev committed Dec 13, 2023
1 parent a01877a commit 3e4ecaf
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ The following environment variables are available. For network configuration, th
* `NET_STATIC`: If set to `yes` then we only perform static network configuration and **all** the above variables **must** be set
* `ROOT_PASSWORD`: The (plaintext) root password

### ssh keys
* By default root is allowed public key ssh access in the resulting VM
* If you volume mount an `authorized_keys` file under `gunet/` folder then it will be used in the resulting ISO: `-v ${PWD/authorized_keys:/var/jeos/gunet/authorized_keys}`

### Special Notes
* The ssh server will listen on port `65432` instead of the default `22`

### Building
* Default `ARG` values:
- ARG DEBIAN_VERSION=11.8.0
Expand All @@ -30,8 +37,11 @@ The following environment variables are available. For network configuration, th

## Size
* Docker image: `510 MB`
* JeOS ISO CD: `450 MB`
* JeOS installation: `3.2 GB`
* JeOS ISO CD:
- Debian 11: `450 MB`
* JeOS installation:
- Debian 11: `3.2 GB`


## Notes for repo files
### Run
Expand Down
2 changes: 0 additions & 2 deletions gunet/authorized_keys
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
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
4 changes: 3 additions & 1 deletion gunet/internal_custom_script.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

export DEBIAN_FRONTEND=noninteractive

apt-get -y update
apt-get -y upgrade
apt-get -y dist-upgrade
Expand All @@ -17,7 +19,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 cdebconf
wget telnet tcpdump lsof iputils-ping cdebconf

apt-get -y update
apt-get -y upgrade
Expand Down
20 changes: 19 additions & 1 deletion gunet/preseed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,22 @@ 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 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;
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; \
in-target mkdir -p /root/.ssh; \
cp /cdrom/gunet/authorized_keys /target/root/.ssh/authorized_keys;

0 comments on commit 3e4ecaf

Please sign in to comment.