Broadcast input
Broadcast types what you type into one terminal into other terminals as well, as you type it. Run sudo apt update once and it is typed at the prompt of every terminal that takes part. It is the quickest way to do the same thing on a few machines while you watch each one.
To run one command on many hosts and read each host’s result instead, see Run on hosts. The Broadcast pop-over opens it too, with Run one command on several hosts.
On a computer
Section titled “On a computer”On Windows, macOS and Linux, broadcast belongs to a tab. A tab broadcasts or it does not. While it does, what you type into one of its terminals is typed into its other terminals too.
Turn it on
Section titled “Turn it on”A tab needs two or more terminals to broadcast. To put several hosts in one tab, see Pane layouts, or use Broadcast to hosts below.
- The Broadcast button. In the session header, choose Broadcast. The pop-over has a switch, Type into every terminal of this tab. With fewer than two terminals it says “Split this tab first: it needs two or more terminals.”
- The keyboard.
Ctrl+Shift+Bstarts or stops broadcast for the tab in front. It works from inside a terminal too. On macOS, the Terminal menu also has Toggle broadcast mode withCmd+Shift+B. You can change the key in Keyboard customization. - The command palette. Under Sessions, choose Broadcast typing in this tab, or Stop broadcasting in this tab while it is on. The palette offers it only for a tab with two or more terminals.
See that it is on
Section titled “See that it is on”While the tab in front broadcasts:
- The Broadcast button is lit and says Broadcasting.
- The top bar shows Broadcasting to and the number of terminals. Click it to stop.
- The tab has a small broadcast mark, also while another tab is in front.
- Each terminal that gets your typing has a colored line along the top of its pane header.
Choose which terminals get it
Section titled “Choose which terminals get it”While the tab broadcasts, the pop-over lists its terminals under Typing goes to, with a box for each. Untick a terminal to leave it out, tick it to take it back, or choose Include all.
Each pane header also has a small broadcast icon. Click it to leave that terminal out or take it back.
Broadcast to hosts
Section titled “Broadcast to hosts”You can pick hosts and have them open together, ready to type into:
- In the Broadcast pop-over, choose Open several hosts side by side and type into all. Or, in the command palette, choose Broadcast to hosts….
- Tick the hosts. Hosts are listed by group; search by name, address or group. A group’s box ticks every host in it and says how many of it are ticked. A host that is already open is marked Open. With Active first on (it is, unless you turn it off here), the open ones stand first, the last used on top.
- Or tick them with a chip: Reboot needed, Updates pending and Warnings tick the hosts the Server monitor already found so, and Open those with a session open. A chip shows only where it has hosts, and with its hosts all ticked it unticks them.
- Choose Open and broadcast. The button stays in sight under the list.
The hosts open side by side in one tab, and that tab broadcasts. A host that is already open is moved into the tab, not opened twice. You need to pick at least two hosts.
Which terminals receive
Section titled “Which terminals receive”- Only the terminals of the tab that are on screen. A terminal behind another one in the same pane, or in a window of its own, gets nothing.
- Only connected terminals. One that is disconnected or still connecting is skipped.
- Typing into a terminal that is left out goes only to that terminal.
- Only what you type or paste is sent on. What a terminal answers its host by itself, and the mouse, go to that terminal’s host only.
- On a host that shows tmux in ZestSSH, the keys go to the tmux pane in front.
A terminal that leaves the tab stops receiving, and one that joins it receives. When the tab comes down to one terminal on screen, for example when you maximize a pane, broadcast stops and says “Broadcast stopped: this tab has one terminal on screen”. It does not start again by itself.
On a phone or tablet
Section titled “On a phone or tablet”On Android, iPhone and iPad, broadcast is for the sessions you pick.
- Connect two or more sessions.
- In a session, open the toolbar’s menu (the three dots) and choose Broadcast mode.
- In the Broadcast sheet, tap OFF to turn it on. Every connected session is picked.
- Under SESSIONS, switch off the sessions you want to leave out, or use Select all and Deselect all.
While it is on, a bar above the terminal says Broadcasting to and the number of sessions. Tap it to open the sheet again, and tap ON to turn broadcast off.
The question before a risky command
Section titled “The question before a risky command”With Dangerous command protection on, ZestSSH looks at the line each receiving terminal would run when you press Enter. It is on by default. On a computer and on a phone it is in Settings > Security and privacy.
If the line is risky, such as rm -rf /, find / -delete, mkfs., wipefs -a, dd writing to a disk, shred of a disk, a fork bomb, chmod -R 777, a download piped into a shell, shutdown or reboot, the Enter is held back from the other terminals and ZestSSH asks Broadcast a destructive command? What is only worth a look, such as a short script or a command inside sh -c '...' with nothing known to do harm in it, is asked as Broadcast this command? The question shows:
- the command, with a value you typed with dots into a snippet as dots,
- why it was flagged (Flagged because),
- every host it would run on, by name.
Send to all hosts runs it on them. It must be clicked or tapped: the Enter you just pressed cannot answer it. Don’t broadcast, Escape, or a click or tap outside the question keep it from running there.
Keep in mind:
- The terminal you typed into already got the Enter. The question only decides whether the other terminals run the command.
- If you say no, the other terminals’ lines are cleared, so a later Enter cannot run it.
- Every line of a paste of several lines is checked.
- If ZestSSH cannot ask, the command does not run on the others and their lines are cleared.
On a computer, the Broadcast pop-over has the same check as a switch, Ask before risky commands. It says “On. rm -rf, reboot, shutdown and the like ask first, before they reach the other terminals.” or “Off. rm -rf, reboot and shutdown run without asking.” It is the same switch as Dangerous command protection in Settings, so turning it off here also stops the questions before snippets and pastes.
Before you broadcast to production
Section titled “Before you broadcast to production”- Check who receives. Every terminal that receives runs what you type. Look at the list in the pop-over, or at the panes with the colored line, before you press Enter.
- Turn it off when you are done. A command you meant for one host goes to all of them while broadcast is on.
- The check is a backstop. It knows a set of risky patterns. A command such as
terraform destroyorDROP TABLEis not among them. You are still responsible for what you send. - Full-screen programs can drift apart. The same keys go to each terminal. Programs that depend on what each host shows, such as an installer’s menu or an editor, can end up in different places on different hosts.
Free plan
Section titled “Free plan”Broadcast is free. On the Free plan you can have up to 5 sessions open at once on a computer and 3 on a phone or tablet, so that is how many terminals you can broadcast to. Broadcast to hosts does not let you open more than your plan allows: “Your plan opens 5 sessions at once. Pick fewer, close some, or upgrade to Squeezed.” Squeezed has no session limit. See pricing.
Q: Can someone else type into my session, or watch it? A: Not through broadcast. Broadcast only types into your own sessions on your own device. Sharing a live session with other people is a team feature: see Session sharing and moderation.
Next steps
Section titled “Next steps”- Pane layouts to arrange the terminals of a tab.
- Run on hosts to run one command on many hosts and see each result.
- Snippets to save commands you use often.
- Workflows for steps that run in order, with failure handling.