Skip to content

krisdimitrov/sshtun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sshtun

In my daily work I need SSH tunnels to work with remote virtual environments and services.
I wrote this simple tool to automate the SSH tunneling and to make it easier to switch between environments
by leveraging dynamic port forwarding with SSH and Firefox profiles.

Prerequisites

  • macOS
  • Firefox

The tool has been tested on macOS Sierra and apart from the Firefox functionallity should work on any other Linux\Unix distro
without much rework.

Installation

Run the installer with sudo permissions:

sudo ./install.sh

Configuration

Open the configuration file and configure the aliasses, IPs and ports:

sudo vim /etc/sshtun/sshtun.conf

Sample config will look something like this:

|alias| |address| |ssh_user| |port|

local	127.0.0.1		root		5557
example	192.168.10.1		foo		5558

Usage examples

Starting a tunel

sshtun -s alias

Listing active tunnels

sshtun -l

Closing all tunnels

sshtun -k

Open Firefox instance with the created profile

sshtun -r alias

Creating and opening simultaneously

sshtun -s alias -r alias

Display aliases

If for some reason you forgot your aliases you can simply show them:

sshtun -c

Issues And Limitations

  1. Chaining multiple command options does not work properly
    The current implementation of the options parsing does not handle chaining very well

Example:

# This will NOT WORK
sshtun -sr alias

About

Simple tool to automate SSH tunneling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages