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

Display SSH host public keys #86

Merged
merged 3 commits into from
May 3, 2024
Merged

Display SSH host public keys #86

merged 3 commits into from
May 3, 2024

Conversation

BenjaminEHowe
Copy link
Contributor

@BenjaminEHowe BenjaminEHowe commented Apr 7, 2024

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

This change displays the SSH host public keys every time the container starts.

Benefits of this PR and context:

Outputting the public keys makes it easier for users to check them when connecting.

How Has This Been Tested?

This is a relatively minor change. I have tested it on my laptop (Ubuntu 22.04 amd64, Docker 24.0.5) and it appears to work. Although I haven't had the opportunity to test the change on an arm64 device I don't see any reason why the change wouldn't work there too.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-6d63c4be-dev-2364b2a7bfd55ff1bd3d127792e5af4bda469930-pr-86/index.html
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-6d63c4be-dev-2364b2a7bfd55ff1bd3d127792e5af4bda469930-pr-86/shellcheck-result.xml

Tag Passed
amd64-9.6_p1-r0-pkg-6d63c4be-dev-2364b2a7bfd55ff1bd3d127792e5af4bda469930-pr-86
arm64v8-9.6_p1-r0-pkg-6d63c4be-dev-2364b2a7bfd55ff1bd3d127792e5af4bda469930-pr-86

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-622af592-dev-debcbde8f58ec0ea220b9e51e461a7b016bda9be-pr-86/index.html
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-622af592-dev-debcbde8f58ec0ea220b9e51e461a7b016bda9be-pr-86/shellcheck-result.xml

Tag Passed
amd64-9.6_p1-r0-pkg-622af592-dev-debcbde8f58ec0ea220b9e51e461a7b016bda9be-pr-86
arm64v8-9.6_p1-r0-pkg-622af592-dev-debcbde8f58ec0ea220b9e51e461a7b016bda9be-pr-86

@thespad thespad self-assigned this May 3, 2024
@thespad
Copy link
Member

thespad commented May 3, 2024

Please use /config/ssh_host_keys rather than /etc/ssh as the latter is just a symlink to the persistent storage.

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-21fe4afa-dev-1b3952968370330587e3e612540f134e551174c7-pr-86/index.html
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-21fe4afa-dev-1b3952968370330587e3e612540f134e551174c7-pr-86/shellcheck-result.xml

Tag Passed
amd64-9.6_p1-r0-pkg-21fe4afa-dev-1b3952968370330587e3e612540f134e551174c7-pr-86
arm64v8-9.6_p1-r0-pkg-21fe4afa-dev-1b3952968370330587e3e612540f134e551174c7-pr-86

@thespad
Copy link
Member

thespad commented May 3, 2024

Thanks, I think I'm happy to approve this, can you just add an entry to the changelog in the readme-vars noting the change.

@aptalca
Copy link
Member

aptalca commented May 3, 2024

One question.

The PR description states displays the SSH host public keys immediately after they are generated. But it actually displays them on every container start.

Which is the behavior we want? Display only when they are generated or display them on every start?

@BenjaminEHowe
Copy link
Contributor Author

BenjaminEHowe commented May 3, 2024

The PR description states displays the SSH host public keys immediately after they are generated. But it actually displays them on every container start.

Which is the behavior we want? Display only when they are generated or display them on every start?

Good spot. IMO the "cost" of displaying the keys is minimal, therefore it's worthwhile displaying them every time the container is started... but I'm happy to edit my code so it does what I said it would do 😄

@thespad
Copy link
Member

thespad commented May 3, 2024

Printing on every start probably makes more sense as you are likely to connect a new client at some point after first run so if you want a quick reference for the keys you want it there every time.

@BenjaminEHowe
Copy link
Contributor Author

Thanks, I think I'm happy to approve this, can you just add an entry to the changelog in the readme-vars noting the change.

Added an entry dated for tomorrow -- hopefully this is OK? (it's getting late-ish today in my TZ, I didn't want to assume that we'd get the change out today!)

@thespad
Copy link
Member

thespad commented May 3, 2024

Doesn't need to be spot on, just close enough that if someone has an issue as the result of a change they can see roughtly when it was made.

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-21fe4afa-dev-5db7cd9845f613c38bca9aaabcfc09958e23b407-pr-86/index.html
https://ci-tests.linuxserver.io/lspipepr/openssh-server/9.6_p1-r0-pkg-21fe4afa-dev-5db7cd9845f613c38bca9aaabcfc09958e23b407-pr-86/shellcheck-result.xml

Tag Passed
amd64-9.6_p1-r0-pkg-21fe4afa-dev-5db7cd9845f613c38bca9aaabcfc09958e23b407-pr-86
arm64v8-9.6_p1-r0-pkg-21fe4afa-dev-5db7cd9845f613c38bca9aaabcfc09958e23b407-pr-86

@thespad thespad merged commit ecde200 into linuxserver:master May 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants