Skip to content

Commit

Permalink
Merge pull request #324 from threefoldtech/ub2304
Browse files Browse the repository at this point in the history
ubuntu 23 multi sshkey support
  • Loading branch information
PeterNashaat authored Jan 23, 2025
2 parents c337db4 + f7fb07b commit 443552e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
11 changes: 4 additions & 7 deletions tfgrid3/ubuntu23.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM ubuntu:23.10
FROM ubuntu:23.04
ENV DEBIAN_FRONTEND=noninteractive

# Install pcakages
RUN apt update && \
RUN sed -i 's|http://archive.ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list && \
sed -i 's|http://security.ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list && \
apt update && \
apt upgrade -y && \
apt install -y wget curl git openssh-server ufw

Expand All @@ -18,11 +20,6 @@ COPY scripts/ufw.sh /usr/local/bin/
# Adding zinit config files
ADD zinit /etc/zinit/

# Install latest myceilum
RUN mycelium_version=$(curl -s https://api.github.com/repos/threefoldtech/mycelium/releases/latest | grep 'tag_name' | cut -d '"' -f 4 ) && \
wget "https://github.com/threefoldtech/mycelium/releases/download/${mycelium_version}/mycelium-x86_64-unknown-linux-musl.tar.gz" && \
tar -xzf mycelium-x86_64-unknown-linux-musl.tar.gz -C /usr/local/bin/

# Cleaning up
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
3 changes: 1 addition & 2 deletions tfgrid3/ubuntu23.10/zinit/ssh_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ exec: /bin/sh -eux -c "
chmod 600 /etc/ssh/*;
touch ~/.ssh/authorized_keys;
chmod 600 ~/.ssh/authorized_keys;
echo $SSH_KEY > /root/.ssh/authorized_keys;
echo 'ssh configred'"
oneshot: true
oneshot: true
6 changes: 2 additions & 4 deletions tfgrid3/ubuntu23.10/zinit/sshd.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
exec: /bin/bash -c " set -x ;
/usr/sbin/sshd;"
test: /bin/bash -c "service ssh status"
exec: /usr/sbin/sshd -D
after:
- ssh_config
- ssh_config

0 comments on commit 443552e

Please sign in to comment.