iOS Shortcuts Examples
ZestSSH’s zestssh:// URL scheme works with iOS Shortcuts, enabling voice-triggered server commands via Siri and automated workflows.
How It Works
Section titled “How It Works”iOS Shortcuts can open URLs, which triggers ZestSSH’s automation handler. Create a shortcut with an “Open URL” action pointing to a zestssh:// endpoint.
Prerequisites
Section titled “Prerequisites”- ZestSSH Pro (automation requires Pro)
- Automation enabled in ZestSSH Settings
- An API key created in Settings > Automation > Manage API Keys
Example 1: Quick Server Status
Section titled “Example 1: Quick Server Status”Purpose: Ask Siri “Server status” to check if your main server is responding.
Shortcut: “Server Status”
Section titled “Shortcut: “Server Status””- Open the Shortcuts app.
- Create a new shortcut named “Server Status”.
- Add action: Open URL
zestssh://execute?connection=MainServer&command=uptime && echo "OK"&key=YOUR_KEY&timeout=10
- 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.
Adding a Notification
Section titled “Adding a Notification”To get a notification with the result instead of switching to ZestSSH:
- After the Open URL action, add a Wait action (5 seconds).
- 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-topicThis sends the result to a push notification service, which then notifies your phone.
Example 2: Restart a Service
Section titled “Example 2: Restart a Service”Purpose: Quickly restart nginx on your web server.
Shortcut: “Restart Nginx”
Section titled “Shortcut: “Restart Nginx””- Create a new shortcut named “Restart Nginx”.
- Add action: Open URL
zestssh://execute?connection=WebServer&command=sudo systemctl restart nginx && echo "nginx restarted"&key=YOUR_KEY&timeout=15
- Set a Siri Phrase: “Restart nginx”
With Confirmation
Section titled “With Confirmation”To prevent accidental triggers, add a confirmation step:
- Add action: Show Alert
- Title: “Restart nginx?”
- Message: “This will restart nginx on WebServer.”
- Buttons: “Restart” / “Cancel”
- Add action: If (result is “Restart”)
- Add action: Open URL (the
zestssh://URL) - End If
Example 3: Morning Server Report
Section titled “Example 3: Morning Server Report”Purpose: Run as part of a morning automation to check multiple servers.
Shortcut: “Morning Servers”
Section titled “Shortcut: “Morning Servers””-
Create a new shortcut named “Morning Servers”.
-
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¶llel=true&timeout=20 -
Set a Siri Phrase: “Morning servers”
Incorporating into a Morning Routine
Section titled “Incorporating into a Morning Routine”Add “Morning Servers” as a step in an existing Shortcuts automation:
- Open Shortcuts > Automation.
- Create a Personal Automation triggered at a specific time (e.g. 7:30 AM).
- Add your existing morning routine actions (weather, calendar, etc.).
- Add action: Run Shortcut > “Morning Servers”
Siri Phrase Suggestions
Section titled “Siri Phrase Suggestions”| Phrase | Action |
|---|---|
| ”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 |
Limitations on iOS
Section titled “Limitations on iOS”- No stdout capture: iOS Shortcuts cannot read the return value from a
zestssh://URL. For result-dependent workflows, use thecallbackparameter 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.
Advanced: Shortcuts with Variables
Section titled “Advanced: Shortcuts with Variables”Use Shortcuts’ “Ask for Input” or “Choose from Menu” actions to build dynamic commands:
- Ask for Input: “Which branch to deploy?”
- Set Variable:
branch= input - Open URL:
zestssh://snippet?connection=Staging&name=deploy-branch&var_branch=[branch]&key=YOUR_KEY
Replace [branch] with the Shortcuts variable reference.