How to Configure Zapier SSH Prevent Delete

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up a zapier ssh prevent delete rule, you restrict the remote Linux user. You pair a locked-down OS role with OpenSSH key or certificate options. Teams often build automated workflows in Zapier that log in to Linux servers. These tasks run shell scripts to move files, check logs, or restart apps. When the remote SSH account has broad write rights, a bad trigger can wipe files. One bad input from a webhook can delete folders across a production host. How to set up zapier ssh prevent delet

SSH Access Management + End-to-End Encryption: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

To set up a zapier ssh prevent delete rule, you restrict the remote Linux user. You pair a locked-down OS role with OpenSSH key or certificate options. Teams often build automated workflows in Zapier that log in to Linux servers. These tasks run shell scripts to move files, check logs, or restart apps. When the remote SSH account has broad write rights, a bad trigger can wipe files. One bad input from a webhook can delete folders across a production host.

How to set up zapier ssh prevent delete in OpenSSH

Zapier runs remote shell steps by logging in as a specific Linux user. It sends the command text you define in the workflow step over SSH. OpenSSH does not inspect shell text to block file removal on its own. Instead, you must control what the remote OS user is allowed to run.

First, create a dedicated Linux user account just for your Zapier tasks. Never use the root account or a shared admin login for automated workflows. Next, use standard Linux file permissions to remove write access on key folders. In Linux, deleting a file requires write access to its parent folder. If the Zapier user can only read a folder, it cannot delete files inside. You can also set the append-only or immutable attribute on critical log files.

For tighter control, you can use OpenSSH certificates or key options. OpenSSH added certificate support for users and hosts in version 5.4. An OpenSSH certificate holds a public key, identity info, principal names, and options. A Certification Authority key signs these details in a simpler format than X.509. When you sign a user key, you can embed a fixed command option. You can also place a forced command option in the server authorized keys file. This tells OpenSSH to ignore whatever shell string Zapier sends over the network. Instead, the server runs one fixed wrapper script that you wrote in advance. That script checks the input and runs only safe, pre-approved actions.

What native OS and SSH rules solve and what they miss

Combining Linux folder rules with forced SSH commands stops many accidents. A compromised Zapier task cannot run arbitrary delete commands across the file system. If a user key leaks, the attacker is stuck inside your wrapper script. Using signed OpenSSH user certificates also helps you set short key lifetimes. By default, signed certificates last forever unless you set a validity window.

SSH Access Management + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, this native setup creates hard trade-offs for a busy engineering team. Native SSH rules decide who can log in, not what dynamic commands do. If Zapier needs to run five different tasks, one forced command is tough. You must write and maintain a complex router script on every single host. Also, some tasks need write rights to create temporary files in a folder. Once a Linux user has write rights on a folder, it can delete files. Native OS permissions cannot tell a safe file write from a file wipe. You also lack a central place to review and approve risky shell steps.

Managing automated shell tasks across many hosts

As your team adds more servers, updating wrapper scripts by hand gets slow. Each change to a Zapier workflow requires an update on the target host. Admins often give up and grant broad permissions just to keep tasks running. A better setup checks each command in flight before it reaches the shell. That way, you block file deletion commands without maintaining custom scripts everywhere.

Check SSH commands and file transfers on the host

OpenSSH keys and certificates decide who can log into a Linux host. They do not check what a one-shot command or file transfer does once the session starts. With hoop.dev, you run an open-source SSH server with guardrails on the host. It checks callers with OpenSSH certificates and works with ssh, sftp, scp, and rsync clients.

When a caller runs a one-shot command or moves a file, hoop.dev guardrails check the command or path before it runs. Then hoop.dev data masking masks matched sensitive patterns in downloads and output. Interactive shells carry no guardrails because keystrokes have no statement boundary. Teams can turn interactive shells off and allow only commands and file tasks. The audit trail logs who connected and what was allowed or refused, without storing keystrokes or file bytes. See the source on GitHub.

Frequently asked questions

Can Zapier block delete commands inside its own SSH action step?

No, Zapier only sends the command text you put in the workflow step. It does not parse shell syntax to block file removal on your server. You must enforce delete blocks on the receiving SSH host or network path.

Does removing write permission on a file stop Linux from deleting it?

No, Linux checks the parent directory permissions when a user deletes a file. If the SSH user has write access to the folder, it can delete files. You must remove write rights on the folder or set the sticky bit.

How do OpenSSH certificates help secure automated Zapier logins?

OpenSSH certificates let a central authority sign user keys with a set lifespan. You can attach options that force a specific script and block port forwarding. This cuts the risk of static keys sitting in third-party automation tools forever.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.