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

Add support for SSH Certificates #6007

Closed
2 tasks done
hbradleyiii opened this issue Sep 5, 2022 · 2 comments · May be fixed by #6785
Closed
2 tasks done

Add support for SSH Certificates #6007

hbradleyiii opened this issue Sep 5, 2022 · 2 comments · May be fixed by #6785
Labels
help wanted Contributor missing / timeout support Community support

Comments

@hbradleyiii
Copy link

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.

As far as I can tell, it doesn't appear that opnsense provides the ability to use custom SSH keys that are signed with SSH certificates. (see here on SSH certificates)

Specifically, I would like to be able to add something like this to the sshd_config (and also remove the existing HostKey entries):

HostKey /custom/dir/ssh_host_ed25519_key
HostKey /custom/dir/ssh_host_rsa_key
HostCertificate /custom/dir/ssh_host_ed25519_key-cert.pub
HostCertificate /custom/dir/ssh_host_rsa_key-cert.pub
TrustedUserCAKeys /custom/dir/trusted-user-ca-keys.pem

Describe the solution you like

What would be really nice is some way to change or hook into the sshd_config before it is written. I'm not familiar enough with opnsense to know if/how this problem is solved with other configuration files, but, ideally, it would be consistent with that method.

Describe alternatives you considered

Another possibility would be to put the keys and certificates in /conf/ssh/ and assume a specific format (i.e. ``*-cert.pubfor certificates) and automatically add theHostCertificate` line if that file exists in `/conf/ssh/`. This doesn't solve the problem of removing unwanted `HostKey` entries (as removed keys appear to be automatically regenerated) or adding `TrustedUserCAKeys`.

Additional context

I'm happy to contribute, but I would like input on a good solution before doing anything.

Thanks!

@fichtner fichtner added the support Community support label Sep 8, 2022
@fichtner
Copy link
Member

fichtner commented Sep 8, 2022

hi @hbradleyiii

TrustedUserCAKeys support is likely the easier part, HostCertificate a bit harder, HostKey removal not really in the scope here as while it's unnecessary for this setup type it's also unnecessary to tackle it in this scope to begin with as it doesn't interfere.

All of this should go to the GUI as we don't support pluggable SSH server configuration.

Cheers,
Franco

@OPNsense-bot
Copy link

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository,
please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue,
just let us know, so we can reopen the issue and assign an owner to it.

@OPNsense-bot OPNsense-bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2023
@OPNsense-bot OPNsense-bot added the help wanted Contributor missing / timeout label Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributor missing / timeout support Community support
Development

Successfully merging a pull request may close this issue.

3 participants