https://github.com/basemax/persistent-ssh-proxy
SSH Tunnel Keeper is a simple Bash script to keep a SOCKS5 proxy tunnel via SSH alive, automatically reconnecting when the connection drops.
https://github.com/basemax/persistent-ssh-proxy
bash linux ssh ssh-client ssh-tunnel ssh-tunnel-guide ssh-tunnel-tool ssh-tunneling ssh-tunnels vpn
Last synced: about 2 months ago
JSON representation
SSH Tunnel Keeper is a simple Bash script to keep a SOCKS5 proxy tunnel via SSH alive, automatically reconnecting when the connection drops.
- Host: GitHub
- URL: https://github.com/basemax/persistent-ssh-proxy
- Owner: BaseMax
- License: mit
- Created: 2025-03-14T10:42:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-14T11:01:02.000Z (over 1 year ago)
- Last Synced: 2025-03-14T11:32:51.220Z (over 1 year ago)
- Topics: bash, linux, ssh, ssh-client, ssh-tunnel, ssh-tunnel-guide, ssh-tunnel-tool, ssh-tunneling, ssh-tunnels, vpn
- Language: Shell
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```sh
sudo apt update && sudo apt install -y openssh-client sshpass
```
### CentOS/RHEL
```sh
sudo yum install -y openssh-clients sshpass
```
### Arch Linux
```sh
sudo pacman -Sy openssh sshpass
```
## Usage
1. Clone this repository:
```sh
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:
```sh
chmod +x ssh_tunnel_keeper.sh
./ssh_tunnel_keeper.sh
```
## License
MIT License
Copyright 2025, Max Base