'Running commands on remote server transparently

I am developing a number of applications that need a bit more power than my local machine has. So I'd like to run them on a remote machine. This is all fairly straightforward and runs something like: 1) rsync the files in the current directory to the remote machine in some location, 2) ssh to remote machine run the command. In some cases, if the remote command generates a file, I'd need to pull that back locally also.

It feels to me like such a common set of tasks that should be a nice command that puts it all together. Say something like

## Run make on the the files in the current directory on big-server-box
rrun big-server-box make

## Do the same, but pull output.txt back afterward
rrun big-server-box -f output.txt make

## Open a shell, having synced files first
rrun big-server-box --shell

Is there any tool that achieves this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source