All Projects → marianafranco → libssh2-tunnel-example

marianafranco / libssh2-tunnel-example

Licence: MIT License
Example of permanent SSH tunnel using libssh2

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to libssh2-tunnel-example

sshtun
Go package to create SSH tunnels
Stars: ✭ 62 (+244.44%)
Mutual labels:  ssh-tunnel
ssh2.nim
Async SSH, SCP and SFTP client for Nim, using libssh2 wrapper [WIP]
Stars: ✭ 17 (-5.56%)
Mutual labels:  libssh2
qlibssh2
Qt wrapper around libssh2
Stars: ✭ 14 (-22.22%)
Mutual labels:  libssh2
ssh tunnel
No description or website provided.
Stars: ✭ 28 (+55.56%)
Mutual labels:  ssh-tunnel
libssh2.nim
Nim wrapper for libssh2
Stars: ✭ 25 (+38.89%)
Mutual labels:  libssh2
holepunch-client
Totally self-contained SSH reverse tunnel written in Go
Stars: ✭ 64 (+255.56%)
Mutual labels:  ssh-tunnel
chromeos-filesystem-sftp
ChromeOS app to access SFTP server
Stars: ✭ 78 (+333.33%)
Mutual labels:  libssh2
jumper
Automated Reverse TCP tunneling using a digitalocean instance and aploium's shootback repo (https://github.com/aploium/shootback)
Stars: ✭ 14 (-22.22%)
Mutual labels:  ssh-tunnel
vex
reverse HTTP proxy tunnel via secure SSH connections.
Stars: ✭ 20 (+11.11%)
Mutual labels:  ssh-tunnel
tunman
Comprehensive solution for SSH tunnels - respawning, healthchecking/monitoring
Stars: ✭ 43 (+138.89%)
Mutual labels:  ssh-tunnel
Ssh-Pascal
Delphi ssh library wrapping libssh2
Stars: ✭ 42 (+133.33%)
Mutual labels:  libssh2
Fenix
A simple and visual static web server with collaboration features.
Stars: ✭ 1,559 (+8561.11%)
Mutual labels:  ssh-tunnel
Glider
glider is a forward proxy with multiple protocols support, and also a dns/dhcp server with ipset management features(like dnsmasq).
Stars: ✭ 1,710 (+9400%)
Mutual labels:  ssh-tunnel
Mole
CLI application to create ssh tunnels focused on resiliency and user experience.
Stars: ✭ 1,520 (+8344.44%)
Mutual labels:  ssh-tunnel
Algo
Set up a personal VPN in the cloud
Stars: ✭ 24,275 (+134761.11%)
Mutual labels:  ssh-tunnel
rsp
Rapid SSH Proxy
Stars: ✭ 223 (+1138.89%)
Mutual labels:  ssh-tunnel

libssh2-tunnel-example

Example of permanent reverse tunnel using libssh2. More at: Reverse SSH tunnel with libssh2

Compiling

To compile, simply run make in the repository.

It depends on libssh2, which you will have to install. On OS X, you can install it using HomeBrew: brew install libssh2

Running

The executable generated can be run as follows:

./libssh2-tunnel-example <remote_host> <username> <password>

By default this code will forward all TCP/IP connections to the remote host on port 4000, to the local machine on port 8080. To change the remote or local ports to be used, you can modify the remote_wantport and local_destport on libssh2-tunnel-example.c, compile, and run it again.

Testing

One way to easily test this is to open a simple HTTP server on the local machine on port 8080 and perform a HTTP GET request on the remote server on port 4000:

  • on local machine: python -m SimpleHTTPServer 8080
  • on remote host: curl localhost:4000

You can also test this using netcat:

  • on local machine: nc -l 8080
  • on remote host: nc 127.0.0.1 4000
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].