Closed takase1121 closed 5 years ago
@takase1121 It does support openssh PEM format key. Can you please provide the configuration, which you are using
const client = new ssh({
host: '192.168.0.12',
username: 'webmin-tunnel',
identity: 'webminkey',
debug: (str) => console.log(str),
compress: true
})
This is what i used, whereas webminkey
is the key file
I had the same problem with a stock key created with ssh-keygen
. This package currently depends on an older version of ssh2 (0.6.2). The latest version of ssh2 (0.8.2) seems to handle private keys better. I updated the packages.json file and then used npm to download the updated ssh2. Now the key works fine. The package maintain should update ssh2 to the latest.
@wtford , @takase1121 Updated to latest ssh2 package https://github.com/sanketbajoria/ssh2-promise/commit/240b3138e5d5663d7c66a4385e1c8bb01087483b
@takase1121, @wtford Please, verify, if you still face the issue of parsing privatekey
At least now it spits another error saying that ed25519 is not supported. I assume that this bug is fixed.
@takase1121 Seems like new version 0.8.3 ssh2 has been released. Will be bumping ssh2-promise again
I updated ssh2-promise to latest and my project parses privatekey without issue. Thanks for keeping this project updated.
@takase1121 new version of ssh2-promise has been released. Now it should support ed25519
Closing this issue, as comment further. Please feel free to open it again. If you face any problem
I still can't get an ed25519 key to work. I get the following error...
{
"errorType": "Error",
"errorMessage": "Cannot parse privateKey: Unsupported OpenSSH private key type: ssh-ed25519",
"trace": [
"Error: Cannot parse privateKey: Unsupported OpenSSH private key type: ssh-ed25519",
" at Client.connect (/opt/nodejs/node_modules/ssh2/lib/client.js:243:13)",
" at __$connectPromise.Promise (/opt/nodejs/node_modules/ssh2-promise/dist/sshConnection.js:246:16)",
" at new Promise (
Has anyone managed to get a connection using an ed25519 key pair?
I tried to log in to my ssh server but it failed with this error. The key works, I tested it with
openssh
and it connects properly and its also in openssh format.