Skip to content

Snippets

Mehdi edited this page Sep 2, 2026 · 3 revisions

Snippets

Snippets let you save frequently used commands and run them with one click. No more typing the same commands over and over.


What Are Snippets?

A snippet is a saved command or script that you can quickly insert into any terminal or run directly. SSH Pilot comes with 40+ pre-built snippets organized by category.


Opening the Snippets Panel

  • Click the snippets button in the header bar
  • Or press the keyboard shortcut assigned to snippets

The snippets panel appears as a sidebar alongside your terminal tabs.


Using a Snippet

One-click execution

  1. Open the snippets panel
  2. Find the snippet you want (use the search bar to filter)
  3. Click the snippet
  4. The command runs in the focused terminal and the output is shown in a toast notification

Insert into terminal

  1. Open the snippets panel
  2. Right-click a snippet
  3. Select Insert into Terminal
  4. The command text is pasted into the terminal without running it (you can edit it first)

Built-in Snippet Categories

SSH Pilot ships with snippets organized into folders:

Category Example Commands
System Info uname -a, uptime, hostname
Network ip addr, ping, netstat, ss -tlnp
Processes top, htop, ps aux, kill
Docker docker ps, docker images, docker logs
Systemd systemctl status, journalctl
Disk df -h, du -sh, lsblk
Logs tail -f /var/log/syslog, dmesg
Security who, last, fail2ban status

Creating a Snippet

Step 1 -- Open the Snippets Panel

Click the snippets button in the header bar, or press the keyboard shortcut assigned to snippets.

Step 2 -- Create a New Snippet

  1. Click the + button or New Snippet
  2. Enter a Name (e.g., "Update Ubuntu")
  3. Enter the Command (e.g., sudo apt update && sudo apt upgrade -y)
  4. Optionally assign a Folder and Tags

Step 3 -- Save

Click Save. Your snippet is now available in the snippets panel.


Using Placeholders

Snippets can include placeholders for values you want to fill in each time:

  1. Use ${variable_name} in your command
  2. When you run the snippet, SSH Pilot will prompt you for each placeholder

Example:

ssh ${user}@${host} "sudo tail -n ${lines} /var/log/syslog"

When you run this snippet, you will be prompted for user, host, and lines.


Organizing Snippets

Folders

  • Create folders to group related snippets
  • Default folders: System Info, Network, Processes, Docker, etc.
  • Create your own folders for your custom commands

Tags

  • Add tags to snippets for cross-folder filtering
  • Example: tag a snippet with production and monitoring

Favorites

  • Mark frequently used snippets as favorites
  • Favorites appear at the top of the panel for quick access

Reordering

  • Drag and drop snippets to reorder them within a folder

Searching Snippets

Use the search bar at the top of the snippets panel to filter by:

  • Snippet name
  • Command text
  • Tags

Executing Snippets on Remote Servers

Snippets run in the currently focused terminal. To run a snippet on a specific server:

  1. Click the terminal tab for that server
  2. Open the snippets panel
  3. Click the snippet you want to run

The command runs in that server's terminal.


Snippets Are Included in Backups

Your snippets library is automatically included when you back up your SSH Pilot configuration. See Backup for details.


Next Steps

Clone this wiki locally