title: SSH to a server from nodejs with ed25519 key
body: <p>I tried using the module ssh2 by mscdex which, but it doesn't support  the key ed25519.</p>
  
  <pre><code>var Connection = require('ssh2');
  var c = new Connection();
  c.connect({
      host: host,
      port: port, 
      username: user,
      privateKey: require('fs').readFileSync(keyPath)
  });
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>
  
  <p>Does anyone know a way to connect to the server using ed25519 keys?</p>