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.
userauth publickey: Unable to extract public key from private key file: Wrong passphrase or invalid/unrecognized private key file format
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, 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.