I agree, both options are bandaids to the real issue: ssh authentication order 
not being up to the user. The password being passed back is of no issue if I 
can select the authentication method used down the way. The way I am using 
Jclouds now is to "direct" jclouds to use a specific authentication method by 
forcing it to leave out a password or private key.

If we add to LoginCredentials (or subclass) a single method:
   
     Array<SshAuthenticationScheme> sshAuthenticationOrder = 
Array(SshAuthenticationScheme.SSHAGENT, SshAuthenticationScheme.PRIVATE_KEY, 
SshAuthenticationScheme.PASSWORD)

.. or something similar. We can then change Jsch,Sshj drivers to fallback on 
authentication schemes using that order. The retry strategy would be to try 
each authentication scheme and if all are exhausted  we retry from the top in x 
seconds. 


Its not just SshAgent though, you might want to choose between:

* private key
* password
* ssh-agent

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

Reply via email to