gtg092x / gulp-sftp

Gulp SFTP Deploy
140 stars 61 forks source link

sftp fails with message "All configured authentication methods failed" #47

Open bsanth opened 8 years ago

bsanth commented 8 years ago

Hi guys,

I am on Mac OS X El Capitan and my gulp-sftp fails with the following message:

[16:35:58] Error in plugin 'gulp-sftp' Message: All configured authentication methods failed Details: level: client-authentication

I dug a bit and this might be the cause of the error: https://github.com/mscdex/ssh2/issues/238

bsanth commented 8 years ago

Here is a fix. This should go to line 192 instead of just c.connect(connection_options);

        connection_options.tryKeyboard = true;
        c.on('keyboard-interactive',
            function(name, instructions, instructionsLang, prompts, finish) {
            // Pass answers to `prompts` to `finish()`. Typically `prompts.length === 1`
            // with `prompts[0] === "Password: "`
            finish([connection_options.password]);
        }).connect(connection_options);
dandrewrichardson commented 8 years ago

Can confirm that this fix worked for me, also on El Capitan.

ruslanxdev commented 8 years ago

It works. But I had yet to update openssl v0.9.8zh -> v1.1.0-pre1. http://mac-dev-env.patrickbougie.com/openssl