CLI export of SSH private key does not export in the expected format.
I store SSH private keys in 1Password, and would like to run a command using the OP CLI to "get" or "read" a private key.
When run the following OP command:
op read op://private/'Key Name'/'Private Key'
A key is returned starting with the text:
-----BEGIN PRIVATE KEY-----
or
When run the following OP command:
op item get 'Key Name' --fields label='Private Key'
A key is returned starting with the text/key header:
-----BEGIN PRIVATE KEY-----
As I understand the a key starting with -----BEGIN PRIVATE KEY----- is in the PEM format.
However when I "Export" or "Reveal" the stored Private SSH key, using the 1Password Application (macOS) v8.10.3 a key starting with the following text/key header is returned:
----BEGIN OPENSSH PRIVATE KEY-----
As I understand the a key starting with the text/key header of ----BEGIN OPENSSH PRIVATE KEY----- is in the OPENSSH format.
How can I get the OP CLI command to be consistent behaviour to the 1Password macOS application "Export" and run a command to "get" or "read" the private key in the OPENSSH format and starting with the text/key header of ----BEGIN OPENSSH PRIVATE KEY----- ?
Is this an open bug 1Password/OP CLI?
Please advise.
OP CLI version - 2.16.0
A previous (closed) related support thread: https://1password.community/discussion/128054/how-to-export-ssh-private-key-using-cli
1Password Version: 8.10.3
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided
