Copy file to remote server, using ssh2 as base.
This is a Node.js module available through the npm registry.
This module was written in node v12.13.0
Also tested with gulp 4 Gulp
node.js version supported
node v10.17.0
up
$ npm install gulp-scp3 --save-dev
import gulp from 'gulp'; // const gulp = require('gulp');
import scp from 'gulp-scp3'; // const scp = require('gulp-scp3');
gulp.task('default', () => {
return gulp.src('**/*.js')
.pipe(scp({
host: 'remoteserver-ip',
username: 'username',
password: 'password',
dest: '/home/username/'
}))
.on('error', function(err) {
console.log(err);
});
});
Type: String
Default value: localhost
A string value that is the host of the server.
Type: Number
Default value: 22
The ssh port of the server. Note this option wasn't tested.
Type: String
Default value: admin
The username of the server.
Type: String
The password of the user on the remote server.
Type: String
Default value: /home/username
Remote server directory
If you want to support this free project. Any help is welcome. You can donate by clicking one of the following links:
Copyright (c) 2019 jinvillaz. Licensed under the MIT license.