Skip to content

SSH Tunnel Keeper is a simple Bash script to keep a SOCKS5 proxy tunnel via SSH alive, automatically reconnecting when the connection drops.

License

Notifications You must be signed in to change notification settings

BaseMax/persistent-ssh-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

SSH Tunnel Keeper

SSH Tunnel Keeper is a simple Bash script to keep a SOCKS5 proxy tunnel via SSH alive, automatically reconnecting when the connection drops.

Features

  • Keeps an SSH SOCKS5 tunnel running in the background
  • Automatically reconnects if the SSH connection is lost
  • Ensures ssh and sshpass are installed before execution

Requirements

  • ssh
  • sshpass

Installation

Make sure you have ssh and sshpass installed. You can install them using:

Debian/Ubuntu

sudo apt update && sudo apt install -y openssh-client sshpass

CentOS/RHEL

sudo yum install -y openssh-clients sshpass

Arch Linux

sudo pacman -Sy openssh sshpass

Usage

  1. Clone this repository:

    git clone https://github.com/yourusername/ssh-tunnel-keeper.git
    cd ssh-tunnel-keeper
  2. Edit the script to replace ****** with your SSH password and server details.

  3. Run the script:

    chmod +x ssh_tunnel_keeper.sh
    ./ssh_tunnel_keeper.sh

License

MIT License

Copyright 2025, Max Base

About

SSH Tunnel Keeper is a simple Bash script to keep a SOCKS5 proxy tunnel via SSH alive, automatically reconnecting when the connection drops.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages