Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SSH and exec

Once a fleet is running, you still need to get onto a single machine to look at it, or run one command across a group. Navi exposes both using the same connection details it deploys with, including IAP tunnels for cloud nodes with no public address.

SSH into a host

navi ssh opens an interactive session on a node:

navi ssh web-01

Append a command after -- to run it and return, rather than opening a shell. This is the quick way to poke at one node during an incident:

navi ssh web-01 -- systemctl restart nginx

Connect as root with -R, and select the host with --on when you prefer the same selector syntax the other commands use:

navi ssh -R --on web-01

Running a command across hosts

navi exec runs a single command on every selected node without opening a session. It is the right tool when you want the same thing done on a group and want to see each node's output:

navi exec uptime
navi exec --on @web -- systemctl is-active nginx

Because exec takes the standard selector, it scales from one node to a whole tier without changing shape. For interactive work on a single machine, reach for ssh; for a fan-out of one command, reach for exec.