jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Varad Meru <va...@orzota.com>
Subject Re: SSH Client not working, but RunScriptOnNodes working
Date Thu, 01 Aug 2013 07:15:48 GMT
Thanks Andrew. 

Got it working. It was due to the path parameter. The assumption that absolute paths are allowed
- failed. The paths changed from absolute to relative paths (for user) worked.

New ssh overridingCredentials - [user=varad, passwordPresent=false, privateKeyPresent=true,
EdgeNodeId- DFW/instanceid
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)]@HOSTNAME:22
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.
Client got connected
echo "getting server output" > ~/temp.out
Success ...
Client Disconnected


On 01-Aug-2013, at 12:31 PM, Varad Meru <varad@orzota.com> wrote:

Thanks for the Reply.

I am able to run command via exec and do SFTP with the same private key

Code Snippet
System.out.println("Client got connected");
client.exec("echo \"getting server output\" > ~/temp.out");
Checking on the box -
[varad@dev-varad2 ~]$ cat temp.out 
getting server output

static-40:work varadmeru$ sftp -i temp/pvt.key varad@HOSTNAME:.
Connected to
Changing to: /home/varad/.
sftp> put temp/testfile
Uploading temp/testfile to /home/varad/testfile
temp/testfile                                             100% 1675     1.6KB/s   00:00  


Varad Meru
Software Development Engineer,
Orzota, Inc. (www.orzota.com)

On 01-Aug-2013, at 4:30 AM, Andrew Phillips <andrewp@apache.org> wrote:

> I am able to run scripts using compute.runScriptOnNode(node.getId(),  script, runScriptOptions)
but I am not able to do ssh using SshClient.

Are you able to run commands (via exec), or does this fail too? Are you able to upload files
using SFTP from the command line using the same private key?



View raw message