Next: remote_expect procedure, Previous: remote_download procedure, Up: Procedures For Remote Communication [Contents][Index]
Execute the supplied program on a remote host. A two-element list is returned. The first element is the exit status of the program or -1 if execution failed. The second element is any output produced by the program. This may be an empty string if output from the program was redirected.
remote_exec hostname program ?options? ?input? ?output? ?timeout?
hostname
Name of the host to execute the command on.
program
Command to execute.
options
Arguments to pass to the program.
input
Input filename to feed to standard input of the command.
output
Output filename where the output from the command should be written.
timeout
Timeout value in seconds.
All of the optional positional arguments accept an empty string as a neutral value.