Skip to content
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

Add ecdsa cert support for client through SSH agent #1440

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xRemaLx
Copy link

@xRemaLx xRemaLx commented Jan 25, 2025

Add ecdsa-sha2-nistp(256|384|521)-cert-v01@openssh.com for client through SSH_AGENT

It is work in case from #910 and #858

I test on my server like this:

const { Client } = require('ssh2');

const conn = new Client();
conn.on('ready', () => {
    console.log('Client :: ready');
    conn.exec('uptime', (err, stream) => {
        if (err) throw err;
        stream.on('close', (code, signal) => {
          console.log('Stream :: close :: code: ' + code + ', signal: ' + signal);
          conn.end();
        }).on('data', (data) => {
          console.log('STDOUT: ' + data);
        }).stderr.on('data', (data) => {
          console.log('STDERR: ' + data);
        });
    });
}).connect({
    host: 'test.server',
    port: 22,
    username: 'xremalx',
    agent: process.env.SSH_AUTH_SOCK,
});

@kobrineli
Copy link

@mscdex
Hi! Could you review this, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants