Giter Site home page Giter Site logo

sshdrill's Introduction

Build Status

sshdrill

A ssh wrapper to automate tunnel creation over multiple jump hosts.

Description

Imagine you are logged into a customer's server. To get there, you had to ssh through one or more jump hosts, and now you need to set up a port forwarding to debug a service.
Configuring the intermediate tunnels to get a port forwarded through all the jump hosts can be tedious. sshdrill automates this task for you.

sshdrill runs as a wrapper around your interactive ssh session. It will listen for the ssh escape sequence '~C' to break into a command prompt which accepts ssh's forwarding syntax. sshdrill converts the requested forwarding into a series of forwardings for each hop on the way, scans how many nested ssh sessions are running, and applies the forwardings accordingly.

##Example Session

me@workstation:~$ alias ssh=sshdrill
me@workstation:~$ ssh jumphost1
user@jumphost1:~$ ssh jumphost2
user@jumphost2:~$ ssh root@target
root@target~$ 
 << ENTER ~C >>
 
sshdrill> -L8080:172.16.5.5:80
Forwarding port through 3 ssh sessions.

ssh> -L8080:172.16.5.5:80
Forwarding port.

ssh> -L8080:127.0.0.1:8080
Forwarding port.

ssh> -L8080:127.0.0.1:8080
Forwarding port.

root@target~$ 

The requested listen port in the forwarding specification is used for the intermediate tunnels. (port 8080 in the example above.)

Features

sshdrill can tunnel local, remote and dynamic port forwardings through any number of ssh sessions.

sshdrill> h
Commands:
      -L[bind_address:]port:host:hostport    Request local forward
      -R[bind_address:]port:host:hostport    Request remote forward
      -D[bind_address:]port                  Request dynamic forward   

Installation

OSX

brew tap mpfz0r/mpfz0r
brew install sshdrill

Debian

# apt-get install devscripts
$ git clone https://github.com/mpfz0r/sshdrill
$ cd sshdrill
$ debuild -uc -us -b
# dpkg -i ../sshdrill_*.deb

Other

make -f Makefile.<Operatingsystem> install

Todo

  • IPv6 forwardings are not supported yet.
  • The escape character cannot be configured.

sshdrill's People

Contributors

mpfz0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bradparks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.