You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Stuart Hendren <no...@github.com> on 2015/06/01 17:43:59 UTC

[jclouds] JCLOUDS-921 prioritise key over password in SSHClientConnection (#761)

>From ticket:
If keyboard interactive login is not allowed on the box but the user also requires a sudo password the ssh fails as it prioritises the password.
If you remove the password then the sudo fails in the SudoAwareInitManager.
It would seem better to prioritise the key over the password in SSHClientConnection or possibly try both if they are both present, and the first fails.

This commit swaps the order of the if else check to use the ssh key if present.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/761

-- Commit Summary --

  * JCLOUDS-921 prioritise key over password in SSHClientConnection

-- File Changes --

    M drivers/sshj/src/main/java/org/jclouds/sshj/SSHClientConnection.java (6)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/761.patch
https://github.com/jclouds/jclouds/pull/761.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/761

Re: [jclouds] JCLOUDS-921 prioritise key over password in SSHClientConnection (#761)

Posted by Ignasi Barrera <no...@github.com>.
Pushed to [master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/f6a97139) and [1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/f88acd67). I've also added a commit after yours to align the Jsch driver, which was required after merging https://github.com/jclouds/jclouds/pull/735. Thanks @stuarthendren!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/761#issuecomment-111102978

Re: [jclouds] JCLOUDS-921 prioritise key over password in SSHClientConnection (#761)

Posted by Ignasi Barrera <no...@github.com>.
Closed #761.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/761#event-328409541

Re: [jclouds] JCLOUDS-921 prioritise key over password in SSHClientConnection (#761)

Posted by Ignasi Barrera <no...@github.com>.
The approach looks good to me. Thanks @stuarthendren!
Looking at how the [jsch driver](https://github.com/jclouds/jclouds/blob/master/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java#L172-L180) manages the credentials I'd say it will already work. Anyway, could you try using it, just to make sure all the ssh drivers are fixed in this issue?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/761#issuecomment-108131628