PackageDescription: HostControl


Host Control

Last published: September 7, 2012 by 'shaffer'

Defines 6 Classes
Extends 6 Classes


HostControl is a small framework for issuing shell commands to a remote (presumably Linux or OSX) server via ssh. Typical usage would look something like:

rc := RemoteControl server: (Server host: 'some.host.address' username: 'remote-user-name').

and then one can execute remote shell commands with:

result := rc executeCommand: 'ls'

This will answer a CommandResult instance. If you just want the contents of standard out, send it #output or, to see the standard error output send it #errorOutput

result output inspect.

The remote command is executed in a login shell (via 'bash -l'), as the specified user, in the home directory of the specified user on the remote system.

A collection of convenience commands are supplied for standard operations like copying a local file to the remote system (using scp). See the api method category for a complete list.

(Note: HostControl does not participate in authentication via ssh so your VisualWorks image must be running in an environment that can ssh into the remote system without a password etc. This is normally accomplished using an ssh "agent".)

HostControl is currently limited to Linux/OSX as both client and server. It has not been tested under other UNIX-like operating systesm although it may work on some. It certainly cannot be expected to work, in its current form, on Windows as client or server.