-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
SSH: unable to connect to ssh server using kex algorithm diffie-hellman-group1-sha1 #8840
Comments
Just tested with SSH-2.0-OpenSSH_9.3p2 Debian-1, same problem. To Reproduce:
Sadly, it seems to be a Tabby issue. I tried to connect to my openssh server with the snippet bellow in a freshly created node project and I didn't encountered any error: const { Client } = require('ssh2');
const { createDiffieHellmanGroup } = require('crypto')
const algo = {
kex: ['diffie-hellman-group1-sha1'],
}
try {
createDiffieHellmanGroup('modp2');
console.log('DH modp2 OK')
} catch (error) {
console.log('DH modp2 NOK')
console.log(error)
}
//console: DH modp2 OK
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: 'localhost',
port: 22,
username: 'clem',
password: 'clem',
algorithms: algo,
debug(information) {
console.debug(information)
},
}); If I understand well, this error is returned by the function |
I apologize, I was clearly inexact about the faulty commit... With the PR #8707, electron version was updated from the major release 22.x.x to 25.x.x. The node version used by electron was bumped from node v16 to v18 between these two electron releases (cf. electron-timelines) In node v18, a part of the crypto DH module was rewrite to now use MODP groups from OpenSSL helper functions instead of getting them from a header file in the crypto module itself (cf. nodejs/node#43896).
What I describe above is the only thing I found which could explain the encountered problem with diffie-hellman-group1-sha1 on tabby. I tried to add as much information as possible but this is a bit out of my league, hope I'm not wrong ^^' |
Dang, this looks really bad for switch admins. I don't see any way to work around this without switching the ssh implementation :( |
Could it be possible to build Tabby against a custom electron repo? It's really not the greatest solution, but it could be a mid-term work around to give a bit more of time to think about a definitive solution. |
Getting an own electron fork going and working with electron-builder would be hell, but I've at least filed a ticket with a possible solution: electron/electron#39603 |
Oh great ! Thank's :D |
Arf.... I just saw electron answer :/ |
Thank you so much, this issue was really a hard blow and an absolute nightmare for me <3 |
Version: nightly (since 2f1c388, electron version update to 25.x.x)
(since 555d3c8, ssh2 version update to 1.14.0)Platform: tested on Windows, Linux
Plugins: none
Describe the problem:
Since this commit 2f1c388 (electron version update to 25.x.x)
555d3c8 (ssh2 version update to 1.14.0), I'm not able to connect to Cisco device using kex algorithm diffie-hellman-group1-sha1.No error in Tabby's log.
Logs I collected on Cisco side:
To Reproduce:
I didn't have the time to test connection with diffie-hellman-group1-sha1 kex on other ssh server than Cisco yet. I also take a quick view on ssh2 issues but didn't found any which could be related to this problem. I will try to do more tests and collect more info in the next few days.
The text was updated successfully, but these errors were encountered: