Sorry for the delay; it's been a crazy week! Finally I've had some time to test
this and it works :)
I've compiled your pull request and then the CLI, and I've run the following
test with it:
* Created a new node in DigitalOcean with a newly generated (and
password-protected) key. I created it from the DigitalOcean console, to make
sure the credentials were not in the jclouds credential store.
```shell
nacx@maqui:~$ ssh-keygen -f /tmp/karaf-key
(... imported the key in DigitalOcean and manually created the node ...)
nacx@maqui:~$ jclouds node list --provider digitalocean
[id] [location] [hardware] [group] [status]
1585252 nyc2 66 karaf-ssh RUNNING
```
* Tried to run a command on the node using the CLI, without providing the
password:
```shell
nacx@maqui:~$ jclouds node runscript --provider digitalocean -u root -d uptime
1585252
[id] [location] [hardware] [group] [status]
1585252 nyc2 66 karaf-ssh RUNNING
Operating System: ubuntu x64 13.10
Configured User: n/a
Public Address: 107.170.136.7
Private Address:
Image Id: 3101918
<< problem applying options to node(1585252):
org.jclouds.rest.AuthorizationException:
(root:rsa[ssh-agent]@107.170.136.78:22) (root:rsa[ssh-agent]@107.170.136.78:22)
error acquiring {hostAndPort=107.170.136.78:22, loginUser=root, ssh=null,
connectTimeout=60000, sessionTimeout=60000} (not retryable): Exhausted
available authentication methods
```
* Added the key to the ssh-agent and executed the same command again (also
without a password):
```shell
nacx@maqui:~$ ssh-add /tmp/karaf-key
nacx@maqui:~$ jclouds node runscript --provider digitalocean -u root -d uptime
1585252
[id] [location] [hardware] [group] [status]
1585252 nyc2 66 karaf-ssh RUNNING
Operating System: ubuntu x64 13.10
Configured User: n/a
Public Address: 107.170.136.78
Private Address:
Image Id: 3101918
Node:1585252 Output: 16:37:39 up 3 min, 1 user, load average: 0.10, 0.06, 0.03
```
So it works. Great job @demobox!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/43#issuecomment-42144630