Why not sftp downloads the files?

There is such task:
gulp.task('sftp', ['build'], function () {
 return gulp.src('dist/**/*')
.pipe(sftp({
 host: 'host.ru',
 user: 'login',
 pass: 'pass',
 remotePath: '/home/login/test.host.EN'
}))
});

When executed displays this error:
[15:33:49] Using gulpfile ~\Desktop\layout-test\gulpfile.js
[15:33:49] Starting 'clean'...
[15:33:49] Finished 'clean' after 9.67 ms
[15:33:49] Starting 'sass'...
[15:33:49] Finished 'sass' after 201 ms
[15:33:49] Starting 'build'...
[15:33:49] Finished 'build' after 4.87 ms
[15:33:49] Starting 'sftp'...
[15:33:49] gulp-sftp: No files uploaded
[15:33:49] Finished 'sftp' after 14 ms

I understand that he can't login although I entered the correct data from the FTP (via FileZilla everything is fine). Then decided that running via SSH and tried to put the key in the field "pass":
gulp.task('sftp', ['build'], function () {
 return gulp.src('dist/**/*')
.pipe(sftp({
 host: 'host.ru',
 user: 'login',
 pass: '/ssh/id_key.pub',
 remotePath: '/home/login/test.host.EN'
}))
});

Then tried to insert the path to the parameter "key" and "pass" are again inserted the password but still not working. Maybe I did do wrong, please tell me.
June 10th 19 at 14:25
0 answer

Find more questions by tags Gulp.jsNode.js