WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:ethz.sshExec
Description:
Id:ethz.sshExec
Category:accessor
Identifier Syntax

ethz.sshExec is an accessor using Active URI syntax with the following base identifiers:

Base
active:sshExec

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
command
Mandatory
Representation (java.lang.Object)The command line to execute on the remote host (must be transreptable to String)
remote
Mandatory
Representation (java.lang.Object)ssh: URI of the remote file
credentials
Mandatory
Representation (java.lang.Object)The ssh credentials
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The following response representations can be returned for SOURCE requests:

SOURCE Representations
Readable Binary Stream

This accessor throws no documented exceptions.

Import Requirements

To use ethz.sshExec accessor you must import the module urn:org:netkernel:client:ssh:

<import>
  <uri>urn:org:netkernel:client:ssh</uri>
</import>

active:sshExec executes a command on a remote SSH server. It makes the stdout of the remote process available to the ROC domain as an IReadableBinaryStream representation.

command

This is the command that will be executed on the remote host. It must be transreptable to java.lang.String.

remote

The remote argument must be an ssh: URI including the hostname. For example:

ssh://remote.server.com

credentials

The credentials argument are the ssh credentials required to connect to the remote host. See credentials section for details.

Example

The following request would execute "uname -a" on the remote SSH server "server.com"

<request>
  <identifier>active:sshExec</identifier>
  <argument name="command">
    <literal type="string">uname -a</literal>
  </argument>
  <argument name="remote">ssh://server.com/x/y/z/MyFile.txt</argument>
  <argument name="credentials">res:/resources/my-ssh-credentials-for-server.com</argument>
</request>

This would return a binary stream representation looking something like...

Linux server.com 2.6.24-24-server #1 SMP Wed Apr 15 15:41:09 UTC 2009 x86_64 GNU/Linux