I am able to run scripts using compute.runScriptOnNode(node.getId(), script, runScriptOptions) but I am not able to do ssh using SshClient.
Any ideas? Thanks in Advance, Regards, Varad Code Snippet ------------------ SshClient client = context .utils() .sshForNode() .apply(NodeMetadataBuilder.fromNodeMetadata(compute.getNodeMetadata(nodeId)) .credentials(overridingCredentials).build()); System.out.println("New ssh client - " + client); try { client.connect(); client.put("/home/USER/files/", Payloads.newFilePayload(new File("testfile"))); } catch (Exception e) { e.printStackTrace(); } finally { if (client != null) client.disconnect(); System.out.println("Client Disconnected"); } ------------------ Error Stack ---- New ssh overridingCredentials - [user=USER, passwordPresent=false, privateKeyPresent=true, shouldAuthenticateSudo=true] EdgeNodeId- DFW/XXXXX nodeMetadata for EdgeNodeId- Hidden. But Correct. New ssh client - haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@HostIP SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Jul 31, 2013 11:20:08 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@HOSTNAME:22) error acquiring Put(path=[/home/USER/jars/]) (attempt 1 of 7): Failure Jul 31, 2013 11:20:27 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@HOSTNAME:22) error acquiring Put(path=[/home/USER/jars/]) (attempt 2 of 7): Failure Jul 31, 2013 11:21:03 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@ HOSTNAME:22) error acquiring Put(path=[/home/USER/jars/]) (attempt 3 of 7): Failure Jul 31, 2013 11:21:32 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@ HOSTNAME:22) error acquiring Put(path=[/home/USER/jars/]) (attempt 4 of 7): Failure Jul 31, 2013 11:22:34 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@ HOSTNAME:22) error acquiring {hostAndPort=166.78.178.195:22, loginUser=haas, ssh=null, connectTimeout=60000, sessionTimeout=60000} (attempt 1 of 7): connect timed out Jul 31, 2013 11:23:22 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@HOSTNAME:22) error acquiring Put(path=[/home/USER/jars/]) (attempt 5 of 7): Failure Jul 31, 2013 11:23:51 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@HOSTNAME:22) error acquiring Put(path=[/home/USER/jars/]) (attempt 6 of 7): Failure Jul 31, 2013 11:24:23 PM org.jclouds.logging.jdk.JDKLogger logError SEVERE: << (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@HOSTNAME:22) error acquiring Put(path=[/home/USER/jars/]) (out of retries - max 7): Failure net.schmizz.sshj.sftp.SFTPException: Failure at net.schmizz.sshj.sftp.Response.error(Response.java:113) at net.schmizz.sshj.sftp.Response.ensurePacketTypeIs(Response.java:91) at net.schmizz.sshj.sftp.SFTPEngine.open(SFTPEngine.java:129) at net.schmizz.sshj.sftp.SFTPEngine.open(SFTPEngine.java:137) at net.schmizz.sshj.sftp.SFTPFileTransfer$Uploader.uploadFile(SFTPFileTransfer.java:204) at net.schmizz.sshj.sftp.SFTPFileTransfer$Uploader.upload(SFTPFileTransfer.java:182) at net.schmizz.sshj.sftp.SFTPFileTransfer$Uploader.access$100(SFTPFileTransfer.java:172) at net.schmizz.sshj.sftp.SFTPFileTransfer.upload(SFTPFileTransfer.java:70) at net.schmizz.sshj.sftp.SFTPClient.put(SFTPClient.java:248) at org.jclouds.sshj.SshjSshClient$PutConnection.create(SshjSshClient.java:311) at org.jclouds.sshj.SshjSshClient$PutConnection.create(SshjSshClient.java:287) at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:193) at org.jclouds.sshj.SshjSshClient.put(SshjSshClient.java:343) at CreateServer.sshAccessTest(CreateServer.java:128) at CreateServer.main(CreateServer.java:88) org.jclouds.ssh.SshException: (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@166.78.178.195:22) (haas:rsa[fingerprint(af:4c:0d:20:dd:8c:22:dd:f3:fa:65:e9:ab:20:1e:3f),sha1(b4:3c:c8:c8:4c:d1:ec:1d:7c:3b:06:9b:24:96:e6:27:de:3a:e6:e7)]@166.78.178.195:22) error acquiring Put(path=[/home/USER/jars/]) (out of retries - max 7): Failure at org.jclouds.sshj.SshjSshClient.propagate(SshjSshClient.java:383) at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:203) at org.jclouds.sshj.SshjSshClient.put(SshjSshClient.java:343) at CreateServer.sshAccessTest(CreateServer.java:128) at CreateServer.main(CreateServer.java:88) Caused by: net.schmizz.sshj.sftp.SFTPException: Failure at net.schmizz.sshj.sftp.Response.error(Response.java:113) at net.schmizz.sshj.sftp.Response.ensurePacketTypeIs(Response.java:91) at net.schmizz.sshj.sftp.SFTPEngine.open(SFTPEngine.java:129) at net.schmizz.sshj.sftp.SFTPEngine.open(SFTPEngine.java:137) at net.schmizz.sshj.sftp.SFTPFileTransfer$Uploader.uploadFile(SFTPFileTransfer.java:204) at net.schmizz.sshj.sftp.SFTPFileTransfer$Uploader.upload(SFTPFileTransfer.java:182) at net.schmizz.sshj.sftp.SFTPFileTransfer$Uploader.access$100(SFTPFileTransfer.java:172) at net.schmizz.sshj.sftp.SFTPFileTransfer.upload(SFTPFileTransfer.java:70) at net.schmizz.sshj.sftp.SFTPClient.put(SFTPClient.java:248) at org.jclouds.sshj.SshjSshClient$PutConnection.create(SshjSshClient.java:311) at org.jclouds.sshj.SshjSshClient$PutConnection.create(SshjSshClient.java:287) at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:193) ... 3 more Client Disconnected ----