Specify sshj public key auth

333 views
Skip to first unread message

Thomas

unread,
Dec 3, 2012, 11:31:10 AM12/3/12
to jcl...@googlegroups.com
Hi,
I'm trying to run a "echo hello world" on new openstack-nova instances via SSH but is met with:

error adding node to group b-mygroup: error running 1 node group(b-mygroup) location(RegionOne) image(b7592802-7988-475a-9598-74fd3447f17e) size(1) options({publicKeyPresent=true, keyPairName=os-key})
Execution failures:

0 error[s]
Node failures:

1) AuthorizationException on node RegionOne/648540fc-737c-47b1-a651-d27b6948584a:
org.jclouds.rest.AuthorizationException: (ubuntu:pw[c758245f4899ea3abb2b43765c2331e0]@ext.ip:22) (ubuntu:pw[c758245f4899ea3abb2b43765c2331e0]@ext.ip:22) error acquiring {hostAndPort=ext.ip:22, loginUser=ubuntu, ssh=null, connectTimeout=60000, sessionTimeout=60000} (out of retries - max 7): Exhausted available authentication methods
at org.jclouds.sshj.SshjSshClient.propagate(SshjSshClient.java:380)
at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:201)
at org.jclouds.sshj.SshjSshClient.connect(SshjSshClient.java:221)
at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.call(RunScriptOnNodeAsInitScriptUsingSsh.java:78)
at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:163)
at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:184)
at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:60)
at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376)
at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods
at net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:114)
at net.schmizz.sshj.SSHClient.auth(SSHClient.java:205)
at net.schmizz.sshj.SSHClient.auth(SSHClient.java:190)
at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:266)
at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:236)
at net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:220)
at org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:140)
at org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:40)
at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:191)
... 10 more
Caused by: net.schmizz.sshj.userauth.UserAuthException: keyboard-interactive auth not allowed by server
at net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:81)
... 18 more


1 error[s]

sshj seems hellbent on using keyboard-interactive auth when i really wish it would use public key. I have installed SshjSshClientModule and uses bcprov and bcpkix.. How do I specify sshj to use public key for auth?

KR 
Thomas

Thomas

unread,
Dec 5, 2012, 10:35:06 AM12/5/12
to jcl...@googlegroups.com
Okey, so there may be a simple solution to my problem: add the oauth-20100527.jar to classpath.. Or at least this seems to have fixed my problem.

/Thomas
Reply all
Reply to author
Forward
0 new messages