Import of SSH keys strips comments, making certain workflows impossible

zyreph
zyreph
Community Member
edited September 2024 in SSH

In the current implementation, there is no way to import or create a new ssh key item without stripping the comment of the public key. As far as i can tell, this is due to 1Password only using the private key on import / creation and generating the public key from that itself. This is probably a good decision as users cannot miss-match key-pairs this way.

This works for most use cases, because the comment is not used in the authorization process. However, some services like Gitea match the public key comment (which is often an email address) against the email address of the service account.
Why Gitea does this can be read e.g. in this Github Issue.

I would suggest an option while creating / edition the ssh key to manually add a comment to the public key.
By doing it this way, the current import logic does not have to be changed and since the new "edit" feature would only allow to add/edit a comment to the public key, the integrity of the key-pair can also not be destroyed by the user on accident.

There have been multiple discussions about the removal of comments already, but sadly no attempts have been made to resolve this issue or at least make it obvious, that the key is not being imported without any changes to its content.


1Password Version: 8.10.40
Extension Version: Not Provided
OS Version: Windows 11
Browser: Not Provided

Comments

  • unshortness
    unshortness
    Community Member

    Another vote for this. When I copy shh keys in from 1Password and paste them into the authorized_keys files on my servers it's annoying to have to manually add a comment so I can tell the keys apart. It would be much better if we could set the comment in 1password and have that be included in the public key when we copy it from 1password.