Skip to content

Commit

Permalink
fix(vine/desktop): store ssh host keys on PVC
Browse files Browse the repository at this point in the history
  • Loading branch information
HoKim98 committed Nov 11, 2024
1 parent 0ed05c7 commit bdb4c0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions templates/vine/desktop/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ RUN apt-get update && apt-get install -y \
zsh-completions \
zsh-syntax-highlighting \
# Backup SSH Configuration
&& rm -rf /etc/ssh/ssh_host_* \
&& cp -r /etc/ssh /etc/.ssh \
# Cleanup
&& apt-get clean all \
Expand Down Expand Up @@ -468,8 +469,6 @@ RUN apt-get update && apt-get install -y \
# Visual Editors
android-studio \
code \
# Backup SSH Configurations
&& cp -r /etc/ssh /etc/.ssh \
# DBus Configuration
&& sed -i '/^root \+messagebus .*$/ d' /var/lib/dpkg/statoverride \
## blueman-applet
Expand Down
3 changes: 2 additions & 1 deletion templates/vine/desktop/scripts/init-desktop-ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ fi

# Generate host SSH keys
if [ ! -f "/etc/ssh/ssh_host_ed25519_key.pub" ]; then
cp -r /etc/.ssh/* /etc/ssh
sudo cp -r /etc/.ssh/* /etc/ssh
sudo ssh-keygen -q -A
fi
sudo rm -rf /etc/.ssh

# Generate user SSH keys
if [ ! -f "${HOME}/.ssh/id_ed25519" ]; then
Expand Down
3 changes: 3 additions & 0 deletions templates/vine/templates/session/user-session.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ spec:
# - name: scripts
# mountPath: /opt/scripts
# readOnly: true
- name: home
mountPath: /etc/ssh
subPath: ssh
- name: tmp
mountPath: /tmp
- name: vine
Expand Down

0 comments on commit bdb4c0d

Please sign in to comment.