Remote Disk Mount

v0.4.0

远程磁盘挂载工具,支持 SMB/CIFS、FTP、SFTP、WebDAV 协议挂载远程共享到本地目录。当用户需要:(1) 挂载 Windows/Samba 共享,(2) 挂载 FTP/SFTP 服务器,(3) 挂载 WebDAV 存储,(4) 将远程存储映射为本地磁盘使用时触发此技能。

1· 571· 5 versions· 0 current· 0 all-time· Updated 23h ago· MIT-0

Install

openclaw skills install remote-disk-mount

Remote Disk Mount

⚠️ Security Note: This skill is for Debian/Ubuntu Linux only. Do NOT use on other OS without adaptation.

⚠️ Security Guidelines

  1. Never pass passwords on command line — Use credential files or interactive prompts instead
  2. Confirm with user before running sudo commands — Don't auto-execute privileged operations
  3. Use SSH keys for SFTP — Avoid password-based authentication
  4. Mount untrusted storage with caution — It can expose local files

🚀 Workflow

Step 1: Collect Info (Ask User)

Ask the user for:

  • Protocol: SMB / FTP / SFTP / WebDAV?
  • Server IP/hostname: e.g., 192.168.1.100 or nas.example.com
  • Username: (for SMB/FTP/SFTP)
  • Password: (will be used interactively, never shown in commands)
  • Share name: (for SMB only, e.g., shared)
  • Mount point name: (optional, e.g., nas, backup)

💡 Tip: Ask one question at a time, wait for response. Don't assume any values.

Step 2: Check Environment

Run this to check/install deps based on protocol:

# SMB
sudo apt install smbclient cifs-utils -y

# FTP
sudo apt install curlftpfs -y

# SFTP
sudo apt install sshfs -y

# WebDAV
sudo apt install cadaver davfs2 -y

Step 3: Create Mount Point

mkdir -p ~/mount_<name>

Protocol Details

SMB/CIFS

Credential file method:

# 1. Create credential file
echo "username=$USERNAME" | sudo tee /root/.smbcredentials
echo "password=$PASSWORD" | sudo tee -a /root/.smbcredentials
sudo chmod 600 /root/.smbcredentials

# 2. Mount
sudo mount.cifs //SERVER_IP/share ~/mount_name -o credentials=/root/.smbcredentials,uid=1000,gid=1000

FTP (curlftpfs)

Interactive password (recommended):

curlftpfs -o user=$USERNAME ftp://SERVER_IP/ ~/mount_name
# Password will be prompted interactively - never shown in command

SFTP (SSHFS)

Key-based auth (recommended):

sshfs $USERNAME@SERVER_IP:/ ~/mount_name -o uid=1000,gid=1000
# Use -o identityfile=~/.ssh/id_rsa for key-based auth

WebDAV

sudo mount -t davfs http://SERVER_IP/webdav /mnt/webdav -o uid=1000,gid=1000
# Password prompted interactively

Unmount

sudo umount /mountpoint
# or for FUSE
sudo fusermount -u /mountpoint

Checklist Before Running

  • Confirm OS is Debian/Ubuntu
  • Get user confirmation before sudo commands
  • Verify remote server is trusted
  • Use SSH keys for SFTP instead of passwords
  • Delete credential files after use if sensitive

Version tags

latestvk97an8202a3na9187s4s92ny2d81z4a0