Direct SSH vs ssh_host in vmup
Choose direct SSH (host, user, key, port) or an OpenSSH alias (ssh_host) from ~/.ssh/config. vmup still calls ssh.
resolveTarget picks one of two modes. Mixing them in one command is rejected (--profile with --ssh-host).
How to set profiles: Point vmup at another VM.
Direct
Used when the profile has no ssh_host, and you did not pass --ssh-host / VMUP_SSH_HOST.
vmup builds:
ssh -p <port> -i <key> -o BatchMode=yes -o StrictHostKeyChecking=accept-new user@host <command>File uploads reuse that ssh: the local file is piped to cat > <remote-file> so the spinner can count bytes as they are written.
BatchMode=yes refuses a password prompt. If the key is missing from authorized_keys, the command fails instead of hanging. accept-new adds unknown host keys; it does not blindly accept a changed key (OpenSSH still fails on mismatch).
The private key is checked on disk first: exists, readable, and not group/world-readable (Unix). That check is skipped in alias mode because vmup may not know which file OpenSSH will use.
Default user is ubuntu. Default port 22. Default key hint ~/.ssh/id_ed25519. Host has no default; without it, vmup tells you to run init.
SSH_AUTH_SOCK lets you omit key in config. vmup then passes no -i and relies on the agent. Port and user@host still come from the profile / env.
Alias (ssh_host)
Used when the profile sets ssh_host, or when you pass --ssh-host / VMUP_SSH_HOST.
ssh lab <command>No -p, no -i from vmup. User, port, IdentityFile, ProxyJump, and HostName come from ~/.ssh/config. If ssh lab works in your terminal, this mode is the one that matches that behavior.
--ssh-host without a profile names the target ssh:<alias> in output. A saved profile keeps its real name (lab) even when that profile’s field is ssh_host.
A Host block that already sets BatchMode or accept-new is fine.
Remote paths and ~
vmup expands ~ via $HOME in remote shell snippets (mkdir, cat, mv, rm, the sweeper). Displayed agent paths keep the ~/vmup/… form.
Which to pick
Direct mode is the init wizard: you type IP, user, key. Good when this laptop’s only SSH client for that VM is vmup.
Alias mode is better when you already have Host stanzas (jumps, non-22 ports, hardware keys). Put ssh_host = "thatHost" on the profile and leave host unset.
A common failure: the profile still has host = "…" from init, you added a Host block, and you expected vmup to use it. Direct mode ignores ~/.ssh/config for identity and port. vmup profiles shows user@ip for direct and ssh_host=name for alias.
Why batches expire
TTL is in minutes. The host cron deletes expired batches. vmup prune --all deletes every remote batch now. The laptop sleep job is a backup if the VM was unreachable.
vmup vs scp and rsync
When to use vmup instead of copying one file with scp or syncing a tree with rsync, if the job is one folder path for a coding agent.