Skip to content

Commit

Permalink
rename sshuser to 'ubuntu' and freeze tailscale clusterdos tag (#8)
Browse files Browse the repository at this point in the history
* move to prod gateway url

* remove ngrok

* attempt multi-arch epitome build

* set platform

* fix targetplatform

* move back to alpine

* change 'sshuser' username to 'ubuntu'

* lock tailscale clusterdos version
  • Loading branch information
condaatje authored Jul 24, 2024
1 parent 6c28e36 commit 0ba8da6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions epitome/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
source:
repoURL: 'https://gitlab.com/squire-exchange/public/cluster-dos.git'
path: gitops/tailscale
targetRevision: main
targetRevision: v0.0.1
helm:
valueFiles:
- values.yaml
Expand All @@ -30,4 +30,4 @@ spec:
automated:
prune: true
allowEmpty: true
selfHeal: true
selfHeal: true
16 changes: 8 additions & 8 deletions sshbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ RUN apt-get update && \
apt-get clean

# RUN adduser --disabled-password --gecos '' docker
RUN useradd -m -s /bin/bash sshuser
RUN useradd -m -s /bin/bash ubuntu

RUN adduser sshuser sudo
RUN adduser ubuntu sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN mkdir /home/sshuser/.ssh
RUN echo "TODO" > /home/sshuser/.ssh/authorized_keys
RUN mkdir /home/ubuntu/.ssh
RUN echo "TODO" > /home/ubuntu/.ssh/authorized_keys

# commented out: this is handled by the entrypoint and volume mount
# RUN chown -R sshuser:sshuser /home/sshuser/.ssh
# RUN chmod 600 /home/sshuser/.ssh/authorized_keys
# RUN chown -R ubuntu:ubuntu /home/ubuntu/.ssh
# RUN chmod 600 /home/ubuntu/.ssh/authorized_keys

# Permit root login via SSH
# RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
Expand All @@ -28,7 +28,7 @@ RUN sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config
EXPOSE 22
EXPOSE 2222

# USER sshuser
# USER ubuntu

# chown authorized keys file and start the SSH service. Then keep the container alive
ENTRYPOINT cat /home/sshuser/auth/auth > /home/sshuser/.ssh/authorized_keys && chown -R sshuser:sshuser /home/sshuser/.ssh && chmod 600 /home/sshuser/.ssh/authorized_keys && service ssh start && tail -f /dev/null
ENTRYPOINT cat /home/ubuntu/auth/auth > /home/ubuntu/.ssh/authorized_keys && chown -R ubuntu:ubuntu /home/ubuntu/.ssh && chmod 600 /home/ubuntu/.ssh/authorized_keys && service ssh start && tail -f /dev/null

0 comments on commit 0ba8da6

Please sign in to comment.