Skip to content
A simple realization of SSH reverse tunnel.
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
README.md
master.go
slave.go
tunnel.go

README.md

Reverse Tunnel

A simple realization of SSH reverse tunnel.

Just establish a tunnel between master and slave, and forward all requests and response to it. Like a reverse shell that only does network requests.

Usage

The commands below equal to ssh -R 0.0.0.0:10002:127.0.0.1:22 root@192.168.3.79

Master

compile.

$ go build -o master master.go tunnel.go

tunnel port 10001, public port 10002.

$ ./master -t 0.0.0.0:10001 -l 0.0.0.0:10002

Slave

compile.

$ go build -o slave slave.go tunnel.go

tunnel addr 192.168.3.79:10001, connect to localhost:22

$ ./slave -t 192.168.3.79:10001 -c localhost:22

You can’t perform that action at this time.