Services & Jobs over SSH
A Mac-only SSH destination for your server. Today it gives shell blocks in Nextcloud Notes a Run on server button; the systemd and cron workspace is not available yet.
MacOn this page
Services & Jobs (SSH) is a Mac-only settings group that names the server you reach over SSH. Its one use today is in Nextcloud Notes: with a destination set, a shell code block in a note gets a Run on server button that opens a terminal on that server with the command ready to paste.
What you get
- Run on server on shell code blocks in a note on the Mac, and Paste the output to bring back what the command printed (see below).
- The Notes templates Runbook (steps, each with a command to run) and Open ports (a command that lists what listens on the server and the ports of your Docker containers) are made for it. Both are in the note editor’s / menu under Templates.
- It does not use one of the three free-plan services, and it has no card in the Mac Services directory.
Set up
| Key | Field | Required | Secret | Where to get it |
|---|---|---|---|---|
SERVICES_SSH_HOST | Services SSH Host | Optional | — | SSH destination for Services & Jobs: user@host or an alias from ~/.ssh/config. Uses noninteractive key or agent authentication and a previously trusted host key. Leave empty to disable. |
SERVICES_SSH_PORT | Services SSH Port | Optional | — | Optional SSH port (1–65535). Leave empty to use your SSH configuration or port 22. |
SERVICES_SSH_IDENTITY_FILE | Services SSH Identity File | Optional | — | Optional path to your local SSH private key; ~/ is supported. Leave empty to use your SSH configuration or agent. Enter a file path, never the key itself. |
Run on server
- In a note on the Mac, write the command in a code block whose language is
sh,bash,zsh,shell,consoleorterminal(or start from the Runbook or Open ports template). - Click Run on server beside the block’s Copy button. The command goes to the clipboard and a terminal opens a session on your server; the note says “Copied. Paste it (⌘V) in the terminal that opened, then “Paste the output” here.”
- Paste the command in the terminal with ⌘V and run it.
- Copy what it printed, go back to the note and choose Paste the output from the homelab tools (the wrench, or / → Homelab). The clipboard goes into the note as an Output block with the time.
The app never runs ssh itself (the Mac app is sandboxed): it copies the command and opens an ssh:// link for
your destination and port, which Terminal answers. That is why nothing runs until you paste.
Works with
- Nextcloud Notes: the only screen that reads these keys today, through Run on server and the runbook templates.
Tips & troubleshooting
- No Run on server button? It appears only on the Mac, only with Services SSH Host set, only while the note
can be edited, and only on a non-empty block marked as a shell language. A plain code block or a
yamlblock gets Copy only. - “Set the Services & Jobs SSH destination in Settings first.” means Services SSH Host is empty.
- “No terminal answered ssh://…” means no app on your Mac opens
ssh://links. The command is still on the clipboard; paste it into your own terminal. - Run on server uses the host and the port. The identity file is not passed on: to use a particular key, put
it in
~/.ssh/configfor that host or add it to your SSH agent. - Keep passwords and tokens out of runbooks: notes are plain text on your Nextcloud, and the editor points out what looks like a secret in a note.