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

Handshake failed: no matching key exchange algorithm #100

Open
godomainz opened this issue Jul 2, 2020 · 1 comment
Open

Handshake failed: no matching key exchange algorithm #100

godomainz opened this issue Jul 2, 2020 · 1 comment

Comments

@godomainz
Copy link

Hi i'm getting below error when I run my gulp tasks
[16:27:46] Starting 'watch-folder'... [16:27:46] 'watch-folder' errored after 456 ms [16:27:46] Error in plugin "gulp-ssh" Message: Handshake failed: no matching key exchange algorithm Details: level: protocol domain: [object Object] domainThrown: true

Here is my code

`var fs = require('fs');
var gulp = require('gulp')
var GulpSSH = require('gulp-ssh');
var path = require('path')
const homedir = require('os').homedir();
var watch = require('gulp-watch');

const config = {
host: 'remotehost.com',
port: 40022,
username: 'username',
privateKey: fs.readFileSync(path.join(homedir+'/.ssh/id_rsa'))
};

const gulpSSH = new GulpSSH({
ignoreErrors: true,
sshConfig: config
});
const excludeddirs = "'!/node_modules/','!/logs/','!/allure-report/','!/allure-results/','!/dist/','!/reports/','!/testresults/'";
const watchsource = './src/specs';
const rootdest = '/tmp/GulpProjects/mydesmond/e2e/';
const watchdest = rootdest+'/src';

gulp.task('copyrootfiles', function() {
return gulp
.src(['.',excludeddirs])
.pipe(gulpSSH.dest(rootdest))
});

gulp.task('watch-folder', function() {
gulp.src(watchsource + '/**/*', {base: watchsource})
.pipe(watch(watchsource, {base: watchsource}))
.pipe(gulpSSH.dest(watchdest));
});
`

@godomainz
Copy link
Author

Seems like you are using "ssh2": "~0.5.5"
You should use latest ssh2 package.
Our servers allow only "curve25519-sha256@libssh.org" algorithm
but the the pakage you are using doesn't allow that

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

No branches or pull requests

1 participant