Narnach / simple_gate

SimpleGate makes it possible to use net/ssh/gateway's capabilities in a simple to use way.

This URL has Read+Write access

Wes Oldenbeuving (author)
Wed Jan 21 05:17:10 -0800 2009
README.rdoc

SimpleGate

SimpleGate makes it possible to use net/ssh/gateway’s capabilities in a simple to use way. The core gateway chaining logic was taken from Capistrano, but rewritten to work in an isolated library.

My purpose for SimpleGate is to make it possible to write simple scripts that use gateway logic. This is useful if you have a server that is serveral hops inside a network.

The original reason for creating SimpleGate is because I got tired of having to scp a rubygem through three hops every time I bumped the version and wanted to run it on a production server.

SimpleGate is simple, meaning it does not (yet) plug into ~/.ssh. Because of this, you’ll have to define ~/.servers.yml and add entries to configure your servers.

An example configuration for the servers ‘foobar’ and ‘barfoo’ would look be:

  ---
  foobar:
    address: "127.0.0.1"
    username: "foo"
    password: "bar
    port: 22
  barfoo:
    address: "192.168.0.1"
    username: "bar"
    password: "foo
    port: 22

Recent changes

Version 0.4.0

  • Updated readme with version history for previous gem versions
  • Added simple_gate executable to use SimpleGate’s new Router class to find a path to a server and execute a command there.

Version 0.3.0

  • Readme now has a project description and updated credits for a bit of Capistrano code
  • Added mutator and documentation for ServerDefinition.servers
  • Updated comment to make more sense

Version 0.2.0

  • Implemented SimpleGate#through_to, which establishes a real ssh session through a number of gateways

Version 0.1.0

  • Removed simple_gate executable
  • Imported SimpleGate and ServerDefinition

Version 0.0.1

  • Created project

Installation

From git

From the project root, use rake to install.

  git clone http://github.com/Narnach/simple_gate
  cd simple_gate
  rake install

This will build the gem and install it for you.

About

simple_gate was created by Wes Oldenbeuving. It is licensed under the MIT license.

SimpleGate#through is based on GatewayConnectionFactory#initialize, which is part of Jamis Buck’s Capistrano and is also licensed under the MIT license.