[英]SSH to a server from nodejs with ed25519 key
I tried using the module ssh2 by mscdex which, but it doesn't support the key ed25519. 我尝试使用mscdex的模块ssh2,但它不支持密钥ed25519。
var Connection = require('ssh2');
var c = new Connection();
c.connect({
host: host,
port: port,
username: user,
privateKey: require('fs').readFileSync(keyPath)
});
The error is: 错误是:
node_modules/ssh2/lib/client.js:225
throw new Error('Cannot parse privateKey: ' + privKeyInfo.message);
^
Error: Cannot parse privateKey: Unsupported key format
at Client.connect
I also tried using node-sshpk because I saw that it supports ed25519, but I didn't find a way to connect to the linux server. 我也尝试使用node-sshpk,因为我看到它支持ed25519,但我没有找到连接linux服务器的方法。
Does anyone know a way to connect to the server using ed25519 keys? 有没有人知道使用ed25519密钥连接服务器的方法?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.