Skip to content

A continuation of Reliable SSH Tunnel, to set up and maintain persistent SSH (reverse) tunnels like and fork from RSTunnel

License

Notifications You must be signed in to change notification settings

huataihuang/CTunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CTunnel

A continuation of Reliable SSH Tunnel, forked from RSTunnel but I want simply deployment.

I like use ssh config to control SSH Tunnel, so I alter RSTunnel, just use simple config for ssh.

The code of CTunnel have many snip from RSTunnel, now just worked. But I will improve it.

reverse tunnel

How to use CTunnel

  • put ctunnel to ~/bin/
mkdir ~/bin
cp ctunnel ~/bin/
  • ~/.ssh/config.myserver ( myserver is the "Host" in config )
cp config.myserver.example ~/.ssh/config.myserver 
  • add config.myserver include in ~/.ssh/config
echo "Include ~/.ssh/config.myserver" >> ~/.ssh/config
  • please change config to your env:

    • Host
    • HostName
    • LocalForward
    • RemoteForward
  • create a SSH RSA key without password:

mkdir -p ~/.ssh/no_pw
ssh-keygen -f ~/.ssh/no_pw/id_rsa

please not use password to protect id_rsa

  • add a crontab to run ctunnel every minutes:
crontab -e

add follow line:

* * * * * /home/admin/bin/ctunnel

ToDo

  • Now just work, but I need add help and options

About

A continuation of Reliable SSH Tunnel, to set up and maintain persistent SSH (reverse) tunnels like and fork from RSTunnel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages