Skip to content

Handshake failed: no matching key exchange algorithm #100

@godomainz

Description

@godomainz

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));
});
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions