Skip to content

iOS Shortcuts Examples

ZestSSH’s zestssh:// URL scheme works with iOS Shortcuts, enabling voice-triggered server commands via Siri and automated workflows.

iOS Shortcuts can open URLs, which triggers ZestSSH’s automation handler. Create a shortcut with an “Open URL” action pointing to a zestssh:// endpoint.

  • ZestSSH Pro (automation requires Pro)
  • Automation enabled in ZestSSH Settings
  • An API key created in Settings > Automation > Manage API Keys

Purpose: Ask Siri “Server status” to check if your main server is responding.

  1. Open the Shortcuts app.
  2. Create a new shortcut named “Server Status”.
  3. Add action: Open URL
    zestssh://execute?connection=MainServer&command=uptime && echo "OK"&key=YOUR_KEY&timeout=10
  4. Tap the shortcut name and set a Siri Phrase: “Server status”

Usage: Say “Hey Siri, Server status” and ZestSSH connects to your server, runs uptime, and shows the result.

To get a notification with the result instead of switching to ZestSSH:

  1. After the Open URL action, add a Wait action (5 seconds).
  2. Add a Show Notification action with a static confirmation message.

Note: iOS Shortcuts cannot directly read the output from a zestssh:// URL. For one-way “fire and trigger” actions, this works well. For result-dependent logic, use the webhook callback approach:

zestssh://execute?connection=MainServer&command=uptime&key=YOUR_KEY&callback=https://ntfy.sh/your-topic

This sends the result to a push notification service, which then notifies your phone.

Purpose: Quickly restart nginx on your web server.

  1. Create a new shortcut named “Restart Nginx”.
  2. Add action: Open URL
    zestssh://execute?connection=WebServer&command=sudo systemctl restart nginx && echo "nginx restarted"&key=YOUR_KEY&timeout=15
  3. Set a Siri Phrase: “Restart nginx”

To prevent accidental triggers, add a confirmation step:

  1. Add action: Show Alert
    • Title: “Restart nginx?”
    • Message: “This will restart nginx on WebServer.”
    • Buttons: “Restart” / “Cancel”
  2. Add action: If (result is “Restart”)
  3. Add action: Open URL (the zestssh:// URL)
  4. End If

Purpose: Run as part of a morning automation to check multiple servers.

  1. Create a new shortcut named “Morning Servers”.

  2. Add action: Open URL

    zestssh://batch?connections=Web1,Web2,DB1&command=echo "$(hostname): $(uptime -p), disk $(df -h / | awk 'NR==2{print $5}')"&key=YOUR_KEY&parallel=true&timeout=20
  3. Set a Siri Phrase: “Morning servers”

Add “Morning Servers” as a step in an existing Shortcuts automation:

  1. Open Shortcuts > Automation.
  2. Create a Personal Automation triggered at a specific time (e.g. 7:30 AM).
  3. Add your existing morning routine actions (weather, calendar, etc.).
  4. Add action: Run Shortcut > “Morning Servers”
PhraseAction
”Server status”Check main server uptime
”Restart nginx”Restart web server
”Check containers”List Docker container status
”Run backup”Trigger backup script
”Deploy staging”Deploy to staging server
”Morning servers”Batch check all servers
  • No stdout capture: iOS Shortcuts cannot read the return value from a zestssh:// URL. For result-dependent workflows, use the callback parameter to POST results to an external service (ntfy.sh, a webhook, etc.).
  • Background execution: iOS may suspend ZestSSH if it takes too long. Keep timeouts reasonable (under 30 seconds for Siri-triggered actions).
  • App switch: Opening a zestssh:// URL briefly switches to ZestSSH. The user sees a flash of the app before returning to Shortcuts. This is an iOS limitation for URL scheme handlers.

Use Shortcuts’ “Ask for Input” or “Choose from Menu” actions to build dynamic commands:

  1. Ask for Input: “Which branch to deploy?”
  2. Set Variable: branch = input
  3. Open URL:
    zestssh://snippet?connection=Staging&name=deploy-branch&var_branch=[branch]&key=YOUR_KEY

Replace [branch] with the Shortcuts variable reference.