🔌
简介
将远程存储(SMB/CIFS/FTP/SFTP/WebDAV)挂载为本地目录,支持Debian/Ubuntu系统,需用户确认特权操作并禁止明文密码。
原始描述
远程磁盘挂载工具,支持 SMB/CIFS、FTP、SFTP、WebDAV 协议挂载远程共享到本地目录。当用户需要:(1) 挂载 Windows/Samba 共享,(2) 挂载 FTP/SFTP 服务器,(3) 挂载 WebDAV 存储,(4) 将远程存储映射为本地磁盘使用时触发此技能。
通过你的 Agent 添加
安装目录:remote-disk-mount/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
Claude Code~/.claude/skills/remote-disk-mount/
Codex CLI~/.codex/skills/remote-disk-mount/
DeepSeek Harness~/.agents/skills/remote-disk-mount/
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: remote-disk-mount description: Mount remote storage (SMB/CIFS, FTP, SFTP, WebDAV) as local directory. For Debian/Ubuntu Linux only. Triggered when user needs to: (1) mount Windows/Samba share, (2) mount FTP/SFTP server, (3) mount WebDAV storage, (4) map remote storage to local disk. NOTE: Requires user confirmation before running privileged commands. Does NOT support plaintext passwords on command line — use credential files or interactive prompts instead. metadata: {"openclaw":{"requires":{"os":["linux"],"bins":["sudo"]}}}
Remote Disk Mount
⚠️ Security Note: This skill is for Debian/Ubuntu Linux only. Do NOT use on other OS without adaptation.
⚠️ Security Guidelines
- Never pass passwords on command line — Use credential files or interactive prompts instead
- Confirm with user before running sudo commands — Don't auto-execute privileged operations
- Use credential files for SMB:
# Create /root/.smbcredentials (mode 600) username=your_user password=your_password sudo chmod 600 /root/.smbcredentials sudo mount.cifs //server/share /mountpoint -o credentials=/root/.smbcredentials,uid=1000,gid=1000 - Use SSH keys for SFTP — Avoid password-based authentication
- Mount untrusted storage with caution — It can expose local files
Protocol 1: SMB/CIFS
1. Install dependencies
sudo apt install smbclient cifs-utils -y
2. List available shares
smbclient -L //SERVER_IP -U username
3. Create credential file (recommended)
sudo nano /root/.smbcredentials
# Add:
# username=your_user
# password=your_password
sudo chmod 600 /root/.smbcredentials
4. Create mount point
mkdir -p ~/mount_yourname
5. Mount (using credential file)
sudo mount.cifs //SERVER_IP/share /mountpoint -o credentials=/root/.smbcredentials,uid=1000,gid=1000
Protocol 2: FTP (curlftpfs)
1. Install dependencies
sudo apt install curlftpfs -y
2. Create mount point
mkdir -p ~/mount_ftp
3. Mount (interactive password - recommended)
curlftpfs -o user=username ftp://SERVER_IP/ ~/mount_ftp
# This will prompt for password interactively
Protocol 3: SFTP (SSHFS)
1. Install dependencies
sudo apt install sshfs -y
2. Create mount point
mkdir -p ~/mount_sftp
3. Mount (key-based auth recommended)
sshfs username@SERVER_IP:/ /mountpoint -o uid=1000,gid=1000
# Use -o identityfile=~/.ssh/id_rsa for key-based auth
Protocol 4: WebDAV
1. Install dependencies
sudo apt install cadaver davfs2 -y
2. Create mount point
sudo mkdir -p /mnt/webdav
sudo chmod 755 /mnt/webdav
3. Configure credentials (optional)
sudo nano /etc/davfs2/secrets
# Add line:
# http://SERVER_IP/webdav username password
sudo chmod 600 /etc/davfs2/secrets
4. Mount
sudo mount -t davfs http://SERVER_IP/webdav /mnt/webdav -o uid=1000,gid=1000
Unmount
sudo umount /mountpoint
# or for FUSE
sudo fusermount -u /mountpoint
Checklist Before Running
- Confirm OS is Debian/Ubuntu
- Use credential files instead of plaintext passwords
- Get user confirmation before sudo commands
- Verify remote server is trusted
- Use SSH keys for SFTP instead of passwords
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。