rzcoder / node-rsa

Node.js RSA library
1.39k stars 205 forks source link

RSA Unsupported key type? #203

Closed DevinKott closed 3 years ago

DevinKott commented 3 years ago

From here, it says that the package supports OpenSSH key types.

Yet, running something like this to generate keys:

ssh-keygen -t rsa -b 4096 -a 100 -f ~/test_keys/id_rsa -q -N 'some_password'

and loading those keys using:

const opensshPrivateKey = fs.readFileSync('~/test_keys/id_rsa').toString();
const opensshPriv = new NodeRSA(opensshPrivateKey);
console.log(opensshPriv);

Does not work. What am I doing wrong?

EDIT: It's throwing here.

rzcoder commented 3 years ago

password-encrypted keys are not supported