$ sshocker -p 8080:80 -v .:/mnt/sshfs user@example.com- 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/sshfsonexample.com
This is akin to docker run -p 8080:80 -v $(pwd):/mnt IMAGE, but sshocker is for remote hosts, not for containers.
$ go get github.com/AkihiroSuda/sshocker/cmd/sshockerTested 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 user@example.com -- sudo apt-get install -y sshfsGlobal flags:
--debug=(true|false)(default:false): debug mode
sshocker's equivalent of docker run.
e.g.
$ sshocker run -p 8080:80 -v .:/mnt/sshfs user@example.comrun can be ommitted, e.g.
$ sshocker -p 8080:80 -v .:/mnt/sshfs user@example.comFlags (similar to docker run flags):
-v LOCALDIR:REMOTEDIR[:ro]: Mount a reverse SSHFS-p [LOCALIP:]LOCALPORT:[REMOTEIP:]REMOTEPORT: Expose a port
SSH flags:
-F,--ssh-config=FILE: specify SSH config file used forssh -F--ssh-persist=(true|false)(default:true): enable ControlPersit
Shows help