rumpty exec runs a single non-interactive command on a VM and prints its output. Always put the remote command after --, so local shell parsing does not eat it:
rumpty exec my-vm -- uptimeQuick start
Chain a longer remote command by handing it to a shell on the VM:
rumpty exec my-vm --ws acme -- bash -lc 'cd /app && git pull'Run a command that needs a terminal (for example sudo):
rumpty exec my-vm --ws acme -t -- sudo systemctl reload nginxRequirements
- A signed-in session (
rumpty login) or theRUMPTY_API_KEYenvironment variable. See Login & Logout. - A workspace: the
--wsflag or$RUMPTY_WORKSPACE. The examples without--wsassumeRUMPTY_WORKSPACEis set.
Flags
| Flag | Description |
|---|---|
-t, --tty | Allocate a pseudo-TTY for the remote command |
-i, --identity | Private key for VM login |
--user | Guest username on the VM |
--ssh-debug | Enable verbose OpenSSH debugging |
Exec vs SSH
exec runs one command and returns; use it in scripts and CI. For an interactive session, use SSH.