Parse error with encrypted SSH keys exported by 1Password
- Dominant language
- Go
- Stars
- 314
- Forks
- 79
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
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.
```shell
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](https://github.com/appleboy/drone-ssh/files/11524624/plain_key_1password.txt)
[encrypted_key_1password.txt](https://github.com/appleboy/drone-ssh/files/11524622/encrypted_key_1password.txt)
[encrypted_key_macos.txt](https://github.com/appleboy/drone-ssh/files/11524623/encrypted_key_macos.txt)
Passphrase: KH8Lehp2*@DgZFBEY2A6
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with encrypted_key_1password.txt and its passphrase, then trace where drone-ssh calls ssh.ParsePrivateKey. Compare the 1Password-encrypted key with encrypted_key_macos.txt and test against the OpenSSH-compatible formats; done means the 1Password-exported encrypted key is accepted without breaking the existing working keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100