rubbissh is a ruby script that generates a ssh config file from a YAML definition.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.mkd
config.yml
keywords.rb
keywords.txt
rubbissh.rb

README.mkd

rubbissh is a ruby script that generates a ssh config file from a YAML definition.

Installation

  • Copy rubbissh.rb and config.yml in your ~/.ssh/ folder.
  • Edit config.yml to suit your needs.
  • Run rubbissh.rb to generate your config file.

I use an alias for quick refreshes: alias rubbissh="$(which ruby) ~/.ssh/rubbissh.rb"

Example config

config.yml

*:
  server_alive_interval: 30
  server_alive_count_max: 120

dev-:
  *:
    user: bobby
    port: 1221

  website: my-web-host.com
  database:
    host_name: my-db-host.com
    identity_file: ~/ident.key

config.out

Host *
	ServerAliveCountMax	120
	ServerAliveInterval	30
Host dev-*
	User	bobby
	Port	1221
Host dev-database
	HostName	my-db-host.com
	IdentityFile	~/ident.key
Host dev-website
	HostName	my-web-host.com

Config details

  • Use the * wildcard to define keywords for all machines under the current level.
  • Use the - symbol after a machine name to create a server group.
  • By default, rubbissh generates a config.out file. Edit rubbissh.rb to customize the output path.