persistent-sshfs for Openclaw

persistent-sshfs is a Bash-based Openclaw Skills utility that retries SSHFS mounts until they connect, then relies on sshfs reconnect for transient drop recovery.

psyb0t
v1.0.6
Aug 2, 2026
0
778
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install persistent-sshfs

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install persistent-sshfs using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is persistent-sshfs?

persistent-sshfs is a Bash utility for reliably bringing up SSHFS mounts in environments where the network, VPN, or remote host may not be ready at startup. It continuously retries key-based SSH authentication for each mount, then mounts the remote directory with sshfs -o reconnect once connectivity is available.

This Openclaw Skills entry is designed for developers and operators who need repeatable, scriptable SSHFS mounting with a simple plain-text mounts file. It is not a live watchdog; instead, it exits after successful mounts and is intended to be re-run periodically, making it a strong fit for cron or systemd timer-based recovery workflows.

persistent-sshfs Use Cases

  • Mount remote development, build, or backup directories locally over SSHFS with automatic retry until the host is reachable.
  • Bring mounts up at boot or login when network, VPN, or SSH availability may be delayed.
  • Keep multiple SSHFS mounts managed from a single plain-text configuration file.
  • Recover mounts after transient disconnects using sshfs -o reconnect.
  • Re-run on a schedule to remount anything that fully died, without manually checking each mount.
  • Standardize SSH key-based mounting across hosts and ports without password prompts.

How persistent-sshfs Works

  1. You define each mount in a plain-text file using the format local_dir:user@host:port:remote_dir.
  2. The script reads the file and starts one background worker per mount.
  3. Each worker repeatedly checks SSH key-based authentication using ssh -o BatchMode=yes -o PasswordAuthentication=no until it succeeds.
  4. Once authentication is available, the worker mounts the remote path with sshfs -o reconnect.
  5. After confirming the mount is up, the worker exits and the main process waits for all workers to finish.
  6. If a mount later drops and sshfs cannot recover it, the intended remediation is to run the script again, or schedule recurring runs with cron or a systemd timer.

persistent-sshfs Setup

  1. Ensure the required binaries are installed:
bash
sshfs
ssh
fusermount
  1. Create your mounts file with one entry per line:
/home/bob/mnt/build-box:[email protected]:22:/srv/build
/home/bob/mnt/backup-nas:[email protected]:2222:/volume1/backups
  1. Make sure your SSH keys already work non-interactively. This skill refuses password authentication and expects key-based auth only.

  2. Run the script against your mounts file:

persistent-sshfs mounts.txt
  1. For persistence across reboots or full mount failures, schedule periodic re-runs with cron or a systemd timer so Openclaw Skills can remount anything currently down.

  2. If the process is interrupted cleanly with SIGINT or SIGTERM, it unmounts and stops workers. If it dies with SIGKILL, manually clean up dangling mounts:

mount | grep fuse.sshfs
fusermount -u /path/to/mount

persistent-sshfs Data Schema & Taxonomy

The skill uses a minimal, file-driven schema with no YAML or JSON configuration.

Field Format Purpose
local_dir local filesystem path Local mount point; created with mkdir -p if missing
user@host SSH target Remote SSH endpoint passed to ssh and sshfs
port integer/string SSH port used for connection and mount
remote_dir remote filesystem path Directory on the remote host to expose locally

Mount file rules:

  • One mount per line.
  • Colon-delimited structure: local_dir:user@host:port:remote_dir.
  • Blank or malformed lines are not specially handled, so the file should be kept clean.

Runtime behavior:

  • One worker process per mount.
  • Workers retry auth every 10 seconds until key-based SSH succeeds.
  • Mounts use sshfs -o reconnect for transient network recovery.
  • The process exits successfully after all mounts are up; it does not act as a permanent daemon.

Operational metadata:

  • Default log level: INFO
  • Supported verbosity override: LOG_LEVEL=DEBUG|INFO|ERROR
  • Cleanup trap: unmounts active mounts and terminates workers on graceful shutdown.

persistent-sshfs Advanced Features

  • Per-mount background workers allow multiple SSHFS targets to be brought up in parallel.
  • Infinite retry loop for initial key-based SSH authentication, which is ideal for boot-time and VPN-dependent workflows.
  • Uses sshfs -o reconnect to survive transient network drops without custom reconnection logic.
  • Clean shutdown trap handles SIGINT and SIGTERM by unmounting and stopping workers.
  • Designed to be re-run periodically, enabling cron or systemd timer-based recovery for mounts that fully died.
  • Simple plain-text mounts file makes it easy to generate, version, or template mount definitions in automation pipelines.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins sshfsbash
Github Stars: 0
forks: 0

Featured*