Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SSH keys part of /usr (read-only on immutable system) #27

Open
gbraad opened this issue Jan 19, 2024 · 0 comments
Open

Make SSH keys part of /usr (read-only on immutable system) #27

gbraad opened this issue Jan 19, 2024 · 0 comments

Comments

@gbraad
Copy link
Collaborator

gbraad commented Jan 19, 2024

RUN mkdir -p /usr/etc-system/ && \
    echo 'PermitRootLogin prohibit-password' > /etc/ssh/sshd_config.d/35-no-root-pw.conf && \
    echo 'AuthorizedKeysFile /usr/etc-system/%u.keys' >> /etc/ssh/sshd_config.d/30-auth-system.conf && \
    curl https://github.com/gbraad.keys | tee -a /usr/etc-system/root.keys && \
    chmod 0600 /usr/etc-system/*.keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant