Skip to content

jimlinntu/ssh-tunneler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ssh-tunneler

Environment

  • Ubuntu 18.04

Setup

  • docker build -t jimlin7777/ssh-tunneler --no-cache .
  • Put your public key (named it as id_rsa.pub) and put it into this folder.
  • Modify parenthesis enclosing string to meet your need and then put create_tunnel.service into /etc/systemd/system/.
  • Modify create_tunnel.sh to meet your need.

Server

  • docker-compose up -d

Client

  • bash create_tunnel.sh or systemctl start create_tunnel (systemctl enable create_tunnel if you want it to start after booting)

References

If the client reconnect before the connection has terminated on the server, you can end up in a situation where the new ssh connection is live, but has no port forwardings. In order to avoid that, you need to use the ExitOnForwardFailure keyword on the client side.

About

A simple Docker container providing a SSH service and a reverse tunnel port.

Topics

Resources

Stars

Watchers

Forks