Remote Execution, has various uses, including multitasking, distributed computation, remote access, and remote file access.
The original remote execution schemes were telnet and rsh, but there is no reason at all for using either of those if you can possibly use ssh instead.
One common approach is to drive ssh as a subprocess, often with the help of Expect.