百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

sshocker

> 编程语言
开源

ssh + 反向 sshfs + 端口转发器,在类似 Docker 的 CLI 中 (Lima 的前身)

649 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

ssh + 反向 sshfs + 端口转发器,在类似 Docker 的 CLI 中 (Lima 的前身)

sshocker: ssh + reverse sshfs + port forwarder, in Docker-like CLI

$ sshocker -p 8080:80 -v .:/mnt/sshfs [email protected]
  • Forward connections to the port 8080 on the client to the port 80 on example.com
  • Mount the current directory on the client as /mnt/sshfs on example.com

This is akin to docker run -p 8080:80 -v $(pwd):/mnt IMAGE, but sshocker is for remote hosts, not for containers.

Install

Download from https://github.com/lima-vm/sshocker/releases .

To download using curl:

curl -o sshocker --fail -L https://github.com/lima-vm/sshocker/releases/latest/download/sshocker-$(uname -s)-$(uname -m)
chmod +x sshocker

To compile from source:

make
sudo make install

Tested on macOS client and Linux server. May not work on other environments, especially on Windows.

To use reverse sshfs, sshfs needs to be installed on the server (not on the client):

$ ssh [email protected] -- sudo apt-get install -y sshfs

Usage

Global flags:

  • --debug=(true|false) (default: false): debug mode

Subcommand: run (default)

sshocker's equivalent of docker run.

e.g.

$ sshocker run -p 8080:80 -v .:/mnt/sshfs [email protected]

run can be omitted, e.g.

$ sshocker -p 8080:80 -v .:/mnt/sshfs [email protected]

Flags (similar to docker run flags):

  • -v LOCALDIR:REMOTEDIR[:ro]: Mount a reverse SSHFS
  • -p [[LOCALIP:]LOCALPORT:]REMOTEPORT: Expose a port

SSH flags:

  • -F, --ssh-config=FILE: specify SSH config file used for ssh -F
  • --ssh-persist=(true|false) (default: true): enable ControlPersist

SSHFS flags:

  • --sshfs-noempty (default: false): enable sshfs nonempty

SFTP server flags:

  • --driver=DRIVER (default: auto): SFTP server driver. builtin (legacy) or openssh-sftp-server (robust and secure, recommended). openssh-sftp-server is chosen by default when the OpenSSH SFTP Server binary is detected.
  • --openssh-sftp-server=BINARY: OpenSSH SFTP Server binary. Automatically detected when installed in well-known locations such as /usr/libexec/sftp-server.

Subcommand: help

Shows help

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言