Skip to content

Instantly share code, notes, and snippets.

@natanlao

natanlao/arq-ssh.md

Last active Jul 19, 2020
Embed
What would you like to do?
Generating SSH keys that will work with Arq

Generating SSH keys with Arq

Tested with Arq 5.

I encountered some issues trying to add my existing SSH key pairs with Arq. I saw errors like:

[path to key]: Key 'OPENSSH' is not supported.

or

userauth publickey: Unable to extract public key from private key file: Wrong passphrase or invalid/unrecognized private key file format

or

DER length is '39' and cannot be more than 4 bytes

I found the following:

  • Arq only supports PEM-formatted keys
  • Arq does not support ed25519 keys (Arq uses libssh2 v1.7.x, ed25519 support is in libssh2 v1.8.x)

As such, generating keys a la

ssh-keygen -t rsa -b 4096 -a 100 -m PEM

worked for me.

You might also see that last error (DER length...) if the password to your private key is incorrect.

On Windows

On Windows, I encountered this error:

Invalid data type, INTEGER(02) is expected

I think this error was caused by protecting my generated SSH keys with extended ASCII characters. Removing these characters from my password seemed fixed the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.