appleboy / drone-ssh

Drone plugin for executing remote ssh commands
MIT License
251 stars 74 forks source link

Parse error with encrypted SSH keys exported by 1Password #256

Open DoubleREW opened 1 year ago

DoubleREW commented 1 year ago

Hi, I'm experiencing the following error when I try to use encrypted keys exported by 1Password for Mac (v8.10.6). I've tried several keys, but none of them work with drone-ssh.

ssh.ParsePrivateKey: ssh: parse error in message type 0

The same keys work when I use them with the built-in ssh client of macOS or with the openssh client of Alpine Linux or Debian Bullseye. I've attached a sample unencrypted key generated by 1Password, the same key encrypted by 1Password, and also the same key encrypted from the terminal using the ssh-keygen tool. All of them work when used with the openssh client, but only the plain and the ssh-keygen encrypted keys work with drone-ssh.

plain_key_1password.txt encrypted_key_1password.txt encrypted_key_macos.txt

Passphrase: KH8Lehp2*@DgZFBEY2A6