Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lima-vm/sshocker
ssh + reverse sshfs + port forwarder, in Docker-like CLI (predecessor of Lima)
https://github.com/lima-vm/sshocker
Last synced: 6 days ago
JSON representation
ssh + reverse sshfs + port forwarder, in Docker-like CLI (predecessor of Lima)
- Host: GitHub
- URL: https://github.com/lima-vm/sshocker
- Owner: lima-vm
- License: apache-2.0
- Created: 2020-09-20T12:11:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-12T00:24:38.000Z (2 months ago)
- Last Synced: 2025-02-07T23:01:58.250Z (14 days ago)
- Language: Go
- Homepage:
- Size: 189 KB
- Stars: 605
- Watchers: 12
- Forks: 29
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sshocker: ssh + reverse sshfs + port forwarder, in Docker-like CLI
```console
$ 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:
```console
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):
```console
$ 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.
```console
$ sshocker run -p 8080:80 -v .:/mnt/sshfs [email protected]
````run` can be omitted, e.g.
```console
$ 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 portSSH flags:
* `-F`, `--ssh-config=FILE`: specify SSH config file used for `ssh -F`
* `--ssh-persist=(true|false)` (default: `true`): enable ControlPersistSSHFS flags:
* `--sshfs-noempty` (default: `false`): enable sshfs nonemptySFTP 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