← 返回
开发者工具 中文

Remote Disk Mount

远程磁盘挂载工具,支持 SMB/CIFS、FTP、SFTP、WebDAV 协议挂载远程共享到本地目录。当用户需要:(1) 挂载 Windows/Samba 共享,(2) 挂载 FTP/SFTP 服务器,(3) 挂载 WebDAV 存储,(4) 将远程存储映射为本地磁盘使用时触发此技能。
远程磁盘挂载工具,支持 SMB/CIFS、FTP、SFTP、WebDAV 协议挂载远程共享到本地目录。当用户需要:(1) 挂载 Windows/Samba 共享,(2) 挂载 FTP/SFTP 服务器,(3) 挂载 WebDAV 存储,(4) 将远程存储映射为本地磁盘使用时触发此技能。
leochens
开发者工具 clawhub v0.4.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 959
下载
💾 27
安装
1
版本
#latest

概述

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

版本历史

共 1 个版本

  • v0.4.0 当前
    2026-03-29 17:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,799
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,165
ai-intelligence

Smart Web Fetch

leochens
智能网页抓取技能 - 替代内置 web_fetch,自动使用 Jina Reader / markdown.new / defuddle.md 清洗服务获取干净 Markdown。支持多级降级策略,大幅降低 Token 消耗。当 Agent
★ 29 📥 5,021