-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot parse privateKey: Unsupported OpenSSH private key type: ssh-ed25519 #1333
Comments
Note that |
Also works if I manually do: const fs = require('fs');
const hostname = ...;
const username = ...;
const pem = fs.readFileSync('/path/to/private/key', 'utf8');
const nodemiral = require('@zodern/nodemiral');
const session = nodemiral.session(hostname, {username, pem});
session.execute('uname -a', function(err, code, logs) {
console.log(logs.stdout);
}); |
Haha! All those working examples were running on Node 19.3! If I do var crypto = require('crypto');
var eddsaSupported = (function() {
if (typeof crypto.sign === 'function'
&& typeof crypto.verify === 'function') {
var key = '-----BEGIN PRIVATE KEY-----\r\nMC4CAQAwBQYDK2VwBCIEIHKj+sVa9WcD'
+ '/q2DJUJaf43Kptc8xYuUQA4bOFj9vC8T\r\n-----END PRIVATE KEY-----';
var data = Buffer.from('a');
var sig;
var verified;
try {
sig = crypto.sign(null, data, key);
verified = crypto.verify(null, data, key, sig);
} catch (ex) {
console.debug(ex);
}
return (Buffer.isBuffer(sig) && sig.length === 64 && verified === true);
}
return false;
})();
console.debug({
eddsaSupported,
});
I will try to reinstall Meteor to see if that fixes it. The systems shared library paths have probably been updated since the last successful deployment. |
Fixed by using Meteor 2.8.2 or Meteor 2.9. Feel free to close. |
Mup version (
mup --version
): tested with 1.5.5 and 1.5.9.Mup config: checked valid, can share relevant parts if necessary.
Output of command
Private key is of type
ed25519
and has header:-----BEGIN OPENSSH PRIVATE KEY-----
. Publishing with this key has worked before, suddenly stopped working.The text was updated successfully, but these errors were encountered: