Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Bastien
2 years agoNew Contributor
Bad characters when exporting SSH private key via CLI
I'm trying to export an SSH private key from 1password to my file system using
op read op://{vault id}/{item id}/private_key > id_25519
I'm using a Windows 11 machine, but working inside...
Former Member
2 years agoThis issue also occurs in the following scenario.
Generate the SSH Key using the browser extension ( Chrome, Windows 10 ). For example, this can be done when adding a key to Bitbucket in the browser. The extension will automatically suggest creating an SSH Key, even though you can't create one directly through the browser extension ( requires 1Password 8 ). Note that the name of the item can't be edited which is inconvenient. It can be edited later in the desktop app.
Next, from a linux (Ubuntu) box with op
installed with apt
, execute any of op run
, op read
, op inject
. Surprisingly, a carriage return ( \r
, ^M
) is included on some lines, making it unusable without further processing.
Is this due to creating the key from a Windows browser?
Can op
detect the OS it is running on and reconstruct the key with the appropriate line endings?
Stripping carriage returns downstream of op
is inconvenient.
Thanks!!!