Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
forty2
4 years agoNew Contributor
Get SSH public key with CLI?
Hi all,
I've been playing with the new SSH key support (which is amazing!) but I've run into a few situations where it would be useful to be able to fetch the public key with the CLI. Unfortunately, that doesn't seem to be possible; op item get
seems to only return the private key. I suppose I could store it as a note, but I really don't want to have to duplicate it like that. Is there another way? If not, I'd love to see it added -- is there a feature request process?
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
3 Replies
- andi_t_1P
1Password Team
Hi @marksie19881 ,
op item get SSHKey --fields 'public key'
should do the trick. Changing the user-facing format of the private key to OpenSSH is on our WIP list but is a broader scope change. The fact that the same value needs to be displayed in OP8 desktop app requires coordination and no promises for when this will be done can be made.All the best,
Andi - Former Member
Is there any update on this?
If i do
op item get ssh_key
it shows the fulll item but if i doop item get ssh_key --fields publicKey
it is blank, I really need this for some automation im working on.I also notice that i cant seem to return the privatekey in OpenSSH format, it is some other format?
- Former Member