Forum Discussion

Former Member's avatar
Former Member
4 years ago

Import SSH keys from CLI

Hey,

Is there a good way to import ssh keys using the cli? I've been using ssh keys with op for a while before the SSH_KEY category was introduced and saving them as Secure Notes.
So I planned on trying to migrate my SECURE_NOTE to SSH_KEY. Right now the move was manual. I've have been using a shell script that I built https://github.com/smgt/dotfiles/blob/master/bin/1p-ssh (not updated for op 2.0.0) to handle this.

Another nice feature would be to expose the public key in the op item get response also, I find it handy to share my public key fast from the command line. Right now it seems to be a calculated value just kept inside 1Password GUI.


1Password Version: op v2.0.0
Extension Version: Not Provided
OS Version: Linux Arch

13 Replies

  • Former Member's avatar
    Former Member

    Wonderful! Thank you!

  • Former Member's avatar
    Former Member

    Hey @smgt, thank you for reaching out to us.

    We have an internal issue open on enabling the creation of SSH key items, that is on our short roadmap.
    I'll keep this ticket updated with the progress on that, thank you for bringing this to our attention!
    Additionally, we're currently working on making op item get display the same attributes as the other 1Password clients, when it comes to SSH Keys (type, fingerprint, public key). That should be released pretty soon, so stay tuned!

    Best,
    Horia

  • Former Member's avatar
    Former Member

    So I took the time to update the script to op 2.0 but I still use SECURE_NOTE to store my ssh keys instead of the new type SSH_KEY.