[erlang-questions] Remote command execution via SSH ?
Tue Aug 14 00:57:06 CEST 2012
On 08/13/2012 02:54 PM, Thomas Elsgaard wrote:
> Does anybody have a good simple example of executing commands on a
> remote server via SSH?
> Nothing fancy, just something like:
> Connect to host
> Execute command '/bin/ls'
> Read output from command
> Close connection
|slave:start_link('nodename', 'user', "-rsh ssh").
Keep in mind that your ssh configuration needs to be set, so you really should test it outside of Erlang before attempting the login within Erlang. Tsung does this for client machines if you wanted to see a production example (|||http://tsung.erlang-projects.org/|).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions