Skip to content

AmyangXYZ/ReverseTunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]

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

About

A simple realization of SSH reverse tunnel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages