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

Connection failed #55

Closed
Serhioromano opened this issue Dec 23, 2014 · 13 comments
Closed

Connection failed #55

Serhioromano opened this issue Dec 23, 2014 · 13 comments
Labels

Comments

@Serhioromano
Copy link

I have connection failed but very strange.

Error connecting to 54.145.. Error: Authentication failure. Available authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password

  1. It makes rsync. SO the connection to SSH must be ok.

  2. When i connect in terminal with ssh deploy@10.10.10.10 it works perfect without require login based on default RSA key.

  3. This is how I setup connection

    plan.target('production', {
    host: '54.145.**.**',
    username: 'deploy',
    agent: process.env.SSH_AUTH_SOCK
    });

So this is what I get.
2014-12-23_15-19-32

@Serhioromano
Copy link
Author

Figured that out. I had to add password.

@rolo-js
Copy link

rolo-js commented Dec 29, 2014

Hi, I have the same problem... Where or what did you add password to?
Thanks.

@Serhioromano
Copy link
Author

@rriosarias First I made like this

plan.target('production', {
    host: '54.145.**.**',
    username: 'deploy',
    password: '*********',
    agent: process.env.SSH_AUTH_SOCK
});

But that was not secure to upload this settings to github. What I did I created id_rsa certificate. Uploaded publick key to server. And pointed my private.

plan.target('production', {
    host: '54.145.**.**',
    username: 'deploy',
    privateKey: '/Users/Sergey/.shh/id_rsa',
    agent: process.env.SSH_AUTH_SOCK
});

And this way it also connect but I do not need to expose my password.

Just make sure that you can connect to your server SSH without the password being asked.

@rolo-js
Copy link

rolo-js commented Dec 31, 2014

Fantastic! Thanks.
FYI, while experimenting, I discovered that you can also use the path to the rsa key in the "agent" property instead of the .SSH_AUTH_SOCK value.

Regards.

@pstadler
Copy link
Owner

pstadler commented Jan 2, 2015

Here's an article regarding adding keys to ssh-agent for passwordless authentication: https://help.github.com/articles/working-with-ssh-key-passphrases/

@neilhanekom
Copy link

Hi Guys,

I am having the same issue here. I have added my rsa_id keys prior to this. So I can connect to my server without password.

Now adding privateKey key/pair to the production object as you have suggested gives me the following line:

Warning: Identity file /Users/neilhanekom/.shh/id_rsa not accessible: No such file or directory.

This is probably a permission/role issue. But I would greatly appreciate if anyone can help me on this.

@pstadler
Copy link
Owner

Try .ssh/ instead of .shh/

Cheers,
Patrick

@romanostolosh-devpronet

Hi everyone,

Cool tool. Just wanted to say that.

One thing that I found inconvenient though is that you still have to provide privateKey, username and so on, regardless the fact that we may have fully functional and configured ssh client localy..

What I'm trying to say is that it would be really cool if we were able to make use of ~/.ssh/config file that user may already have configured

Is it even technically possible?

Thank you in andvance

@pstadler
Copy link
Owner

@romanostolosh-devpronet check this: mscdex/ssh2#70

@romanostolosh-devpronet

@pstadler thanks!
Sounds like a plan :)

@artdevjs
Copy link

I had error with authentication, sounds like "All configured authentication methods failed".
But I solved this by adding path to the privatekey in the connection config.

plan.target('staging', [{
        host: host,
        username: username,
        privateKey: 'path/to/the/.ssh/id_rsa',
        agent: process.env.SSH_AUTH_SOCK
    }
]);

@ALEXOTANO
Copy link

I had error with authentication, sounds like "All configured authentication methods failed".
But I solved this by adding path to the privatekey in the connection config.

plan.target('staging', [{
        host: host,
        username: username,
        privateKey: 'path/to/the/.ssh/id_rsa',
        agent: process.env.SSH_AUTH_SOCK
    }
]);

Works perfectly, just careful not tu use ~/.ssh/key use the whole path.

@MohamedNedal
Copy link

I had error with authentication, sounds like "All configured authentication methods failed".
But I solved this by adding path to the privatekey in the connection config.

plan.target('staging', [{
        host: host,
        username: username,
        privateKey: 'path/to/the/.ssh/id_rsa',
        agent: process.env.SSH_AUTH_SOCK
    }
]);

Where should I write this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants