Servers and production

Opsty reads your servers from ~/.ssh/config and keeps no list of its own. Mark the ones that matter as production, and Opsty treats them with care.

Connecting

Connect in the tab strip, or Go ▸ Connect to a server (⇧⌘H), opens the launcher on the hosts in your ~/.ssh/config. Type to filter. ⏎ opens a New tab and types ssh with that host into it, so your own config, keys and jump hosts stay in charge; ⌥⏎ (Put on the line) places the command on your current line instead. A click selects a server, to read about it; a double-click connects. Opsty installs nothing on your servers.

What a server is

Servers, with staging selected: its lines in ~/.ssh/config, the other name it goes by, its tags, the tab that is on it and the tunnel to its database, beside the list.

Beside the list, Servers shows the highlighted host:

  • its lines in ~/.ssh/config: the host name, user, port, key and forwards, as written there. Anything else in the block, ssh reads itself;
  • Also: other names in your config for the same machine, and Differs when two of them disagree about its key or its lamp;
  • Tags, from hosts.toml, such as prod;
  • Tabs: the tabs that are on it now, each a button that takes you there;
  • Tunnels: ssh -f -N forwards to it running in the background, each said in words, with its command and how long ago it started.

The host, the addresses and a tunnel’s command can be selected and copied. Under them, ssh staging in a new tab is the same as ⏎, and Put on the line the same as ⌥⏎. In a narrow window the preview goes under the list.

When the connection drops

When an ssh session drops (ssh exits with its own error code, 255, rather than because you typed exit), a small offer appears under the prompt: Disconnected from staging, the command that would connect again, and Reconnect, which types that command with Enter. The offer shows its command, so the click is your Enter. Its × dismisses it.

Sending a file to a server

Drag a file over a tab that is on a server and the pane says what a drop will do: Send to staging · rsync, run on this Mac. A path from your Mac would mean nothing in the server’s shell, so Opsty types nothing there. It opens a split on your Mac instead, with rsync -av … staging:~/ placed and read back, copying the file to your home folder on the server. You press Enter, and your own rsync does the copy.

Production

A server row in the launcher has Mark as production, which writes the host to ~/.config/opsty/hosts.toml. Clicking it leaves the keyboard in the launcher’s field, so you can go on moving through the list. From then on, the row says Production in red, and while a tab is on that host:

  • its lamp is red, the whole tab strip turns red and the tab says prod;
  • nothing you run there is recorded in history or offered back the next morning;
  • a command that cannot be undone gets a red ribbon naming what it would lose, and the Enter still goes straight through.

On the highlighted row the same button reads Unmark, and undoes it. No host is ever treated as production because of its name; only the ones you mark.

Agents and forwards

Claude Code run over ssh is recognized from its title; see How Opsty knows an agent. Port forwards, and the form that makes a new one, are on the Running list.