github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

Narnach / simple_gate

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 9
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (5)
  • Downloads (11)
  • Wiki (1)
  • Graphs
  • Tree: 7849bcc

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (11)
    • 0.5.4
    • 0.5.3
    • 0.5.2
    • 0.5.1
    • 0.5.0
    • 0.4.1
    • 0.4.0
    • 0.3.0
    • 0.2.0
    • 0.1.0
    • 0.0.1
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

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

  cancel

http://github.com/Narnach/simple_gagt

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixed gemspec again 
Narnach (author)
Thu Jun 11 09:06:59 -0700 2009
commit  7849bcc6a64fd8430f38593c612d306b84bf2d12
tree    ba4d624bc5459744424721503b1f9552d9b3a0d7
parent  d03f2df3fece68b7a87f269e1d2e3ce536796a3c
simple_gate / README.rdoc README.rdoc
100644 127 lines (92 sloc) 3.924 kb
edit raw blame history

SimpleGate

SimpleGate makes it possible to use net/ssh/gateway’s capabilities in a simple to use way. This makes it possible to write simple scripts that access servers that are located several hops inside a network.

The core gateway chaining logic was taken from Capistrano, but it has been rewritten to be useful in a more generic way than Capistrano allows.

SimpleGate’s Router class makes it possible to automatically find a route through a maze of servers instead of having to manually define gateway chains. An added benefit is that a change to one server’s connections no longer requires you to update all other servers if they relied on it as a gateway.

SimpleGate is simple, meaning it does not (yet) do fancy things such as using ~/.ssh. Because of this, you’ll have to define ~/.servers.yml and add entries to configure your servers. To use the routing functionality used by the gate_cp and simple_gate executables, you have to define routes in ~/.servers.connections.yml

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

Example of a ~/.servers.connections.yml file:

  ---
  local:
  - foo
  foo:
  - bar
  - baz
  bar:
  - foobar
  - foobaz
  - barbaz

All keys are names of servers defined in ~/.servers.yml. The only special node is "local", which is the starting point for all connections and not a real connection.

Recent changes

Version 0.5.4

  • Fixed gemspec: add missing spec files and added missing gem dependencies
  • Updated Rakefile with ruby 1.9 workaround and a missing file spotter

Version 0.5.3

  • Added yardoc documentation to all classes.
  • SimpleGate#through raises an error when no gates are chosen
  • SimpleGate#through uses local variables instead of instance variables
  • ServerDefinition#options is created on the fly

Version 0.5.2

  • Added -V verbose flag to gate_cp
  • Use STDERR for status messages. STDOUT is used to output SSH responses
  • Updated executables to support direct server connections
  • SimpleGate#through_to can connect directly to a server without gateways

Version 0.5.1

  • Updated readme and simple_gate documentation
  • Implemented infinite loop prevention code in Router#find
  • Cleaned up Router#find to be more readable
  • Added spec to show stack overflow occurs when a cyclical graph is used to find a route
  • Added specs for Router#find
  • Added a -V (verbose) flag option to simple_gate
  • Removed empty method definition

Version 0.5.0

  • Added syntax explanation to gate_cp
  • Added gate_cp, which copies one local file to a remote destination

Version 0.4.1

  • simple_gate is now executable

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.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server