Skip to content

Conversation

@xRemaLx
Copy link

@xRemaLx xRemaLx commented Jan 25, 2025

Add ecdsa-sha2-nistp(256|384|521)[email protected] 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?

@xRemaLx
Copy link
Author

xRemaLx commented Feb 7, 2025

@mscdex
Hi! Are there any updates on this? Could you review this, please?


function tryParseAsCert(data, baseType, comment) {
if (!isSupportedCertType(baseType))
return new Error(`Unsupported OpenSSH cert type: ${baseType}`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal note (dunno if it really makes sense): This is the only caller of isSupportedCertType and the code below generates the very same error in its default: case. So, you could remove isSupportedCertType and the two lines above without any change in behaviour.

Still, it might make sense to keep things like this just for consistency with the rest of the library (there is also isSupportedKeyType()). I'll leave that to @mscdex to decide.

@xRemaLx
Copy link
Author

xRemaLx commented Mar 27, 2025

Hi @mscdex!

I'm wondering if there are any comments or updates on this matter?

@xRemaLx
Copy link
Author

xRemaLx commented Jun 11, 2025

Hello @mscdex!
Please pay attention to this request.
Thanks!

@xRemaLx
Copy link
Author

xRemaLx commented Sep 24, 2025

Hello @mscdex!
I am still waiting for your attention to this request.
Thanks!

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.

4 participants