[Feature Request] Expose use of "no-touch-required" for sk ssh keys in webui #8411

Open
opened 2025-11-02 08:05:11 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @bdelwood on GitHub (Jan 26, 2022).

Feature Description

Per the ssh-keygen docs, sk type ssh keys have an option to disable touch presence via passing -O no-touch-required during key generation. sshd rejects such signatures by default, but this can be overridden by adding no-touch-required to the authorized_keys option.

It would be nice for no-touch-required sk keys to be supported, via some interface when adding ssh keys on the webui.

An example authorized_keys entry:

no-touch-required sk-ecdsa-sha2-nistp256@openssh.com AAAAInN...Ko== user@example.net

Manually editing the authorized_keys file when using the internal sshd works as expected. It would be nice for this to be exposed in the UI.

Originally created by @bdelwood on GitHub (Jan 26, 2022). ### Feature Description Per the [`ssh-keygen` docs](https://man.openbsd.org/ssh-keygen.1#no-touch-required), `sk` type ssh keys have an option to disable touch presence via passing `-O no-touch-required` during key generation. `sshd` rejects such signatures by default, but this can be overridden by adding `no-touch-required` to the authorized_keys option. It would be nice for `no-touch-required` sk keys to be supported, via some interface when adding ssh keys on the webui. An example authorized_keys entry: ``` no-touch-required sk-ecdsa-sha2-nistp256@openssh.com AAAAInN...Ko== user@example.net ``` Manually editing the `authorized_keys` file when using the internal sshd works as expected. It would be nice for this to be exposed in the UI.
GiteaMirror added the type/proposal label 2025-11-02 08:05:11 -06:00
Author
Owner

@mrusme commented on GitHub (Aug 23, 2024):

Any updates on this one?

@mrusme commented on GitHub (Aug 23, 2024): Any updates on this one?
Author
Owner

@techknowlogick commented on GitHub (Aug 24, 2024):

Not on a per key basis right now, but you can globally edit the template of what gets added to the autorized_key file, so you could have no-touch-required added to each line. I'm not sure if for keys that don't require that it'd be breaking though, and I'd be interested to hear your experience.
The setting is SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE and the line it modifies ends up being used here: https://sourcegraph.com/github.com/go-gitea/gitea/-/blob/models/asymkey/ssh_key_authorized_keys.go?L41

@techknowlogick commented on GitHub (Aug 24, 2024): Not on a per key basis right now, but you can globally edit the template of what gets added to the autorized_key file, so you could have `no-touch-required` added to each line. I'm not sure if for keys that don't require that it'd be breaking though, and I'd be interested to hear your experience. The setting is `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE` and the line it modifies ends up being used here: https://sourcegraph.com/github.com/go-gitea/gitea/-/blob/models/asymkey/ssh_key_authorized_keys.go?L41
Author
Owner

@GiteaBot commented on GitHub (Sep 23, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Sep 23, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Author
Owner

@mrusme commented on GitHub (Sep 23, 2024):

Why does this need feedback @lunny? I think the task is pretty clear: Allow the use of no-touch-required through the web UI.

Maybe you could re-open this issue? Thank you!

@mrusme commented on GitHub (Sep 23, 2024): Why does this need feedback @lunny? I think the task is pretty clear: Allow the use of `no-touch-required` through the web UI. Maybe you could re-open this issue? Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8411