Farside manual / The terminal
The terminal
NAME
The terminal: a shell on the Mac over SSH, through Farside's paired connection.
SYNOPSIS
Turn on Remote Login on the Mac, once. Then pick the Mac on the iPad, tap Terminal, and log in with the Mac account's name and password.
DESCRIPTION
The terminal talks to the Mac's own SSH server, inside the connection Farside already checks end to end. No port is opened to the internet, and Farside on the Mac passes the bytes on without reading them. It works while the Mac is locked or its display is off, and leaves a dark display dark. The Mac still has to be awake.
SET UP
- On the Mac, open System Settings > General > Sharing and turn on Remote Login. You can limit it to your own account there.
- Farside Settings on the Mac says On under Terminal once it can reach the SSH server.
LOG IN
On the iPad, pick the Mac and tap Terminal, or tap Terminal in the screen's controls. Your Mac account name is filled in. Type the password and tap Log In. The password goes to the Mac's SSH server and is never saved. exit ends the shell; Log In Again starts another.
The top bar has ‹ back to your Macs, the Mac's tab, and screen, which shows the Mac's screen in the same connection. Terminal there comes back to the same shell.
THE KEY ROW
Along the bottom: esc, tab, ctrl, ⌘, the arrows, |, ~ and /.
- ctrl holds for the next key: ctrl then c stops a running command.
- ⌘ is the iPad's copy and paste: ⌘ then c copies the selected text, ⌘ then v pastes.
- Tap ctrl or ⌘ twice to keep it on, and once more to let go. Brass text means it's on for one key; a brass fill means it's kept on.
- With a hardware keyboard, Control, Option and the arrows go straight to the shell, and ⌘C and ⌘V copy and paste.
To select text, touch and hold, or click and drag with the trackpad. Then ⌘ and c copies it.
Pinch to make the text larger or smaller. Each Mac keeps its own size.
KEEP THE SHELL RUNNING
Off at first. Turn on Keep the shell running (tmux) on the login, or in the Mac's details. Farside then logs in to a tmux session called farside, and attaches to it again next time, so a dropped connection or leaving the app doesn't stop what's running.
It needs tmux on the Mac. macOS doesn't include it; with Homebrew:
brew install tmux
Without tmux, the terminal says so and starts a plain shell.
TMUX IN BRIEF
tmux keys start with ctrl then b. Let go, then press the next key. On the iPad that is ctrl, b, then the key.
- ctrl b, then d: detach. tmux and what's running in it carry on without you. The terminal shows that the session ended.
- ctrl b, then [: scroll back. Use the arrows, then q to leave.
- ctrl b, then c: a new window.
- ctrl b, then n or p: the next window or the previous one.
To get back in, tap Log In Again with Keep the shell running on. Farside runs tmux new-session -A -s farside: it attaches to the farside session if it's still there, and starts it if not. From any other shell on the Mac, tmux attach -t farside does the same.
Only what's running in the Mac's farside session survives. If the Mac restarts, or you end tmux with exit in its last window, the session is gone.
TROUBLESHOOTING
- Turn on Remote Login on …: do step 1 of SET UP, then tap Try Again.
- That name or password didn't work.: use the Mac account's short name, as in the
/Usersfolder, and its password. - That wasn't …'s own SSH server: something else answered on the Mac's SSH port, so the password wasn't sent. Check that Remote Login is on, and what's running on the Mac.
- The session ended while Farside was in the background.: iPadOS stops Farside when you leave it. Tap Log In Again. With Keep the shell running on, your work is still there.
SEE ALSO
The screen, Security, man ssh, man tmux