Skip to content

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

Notifications You must be signed in to change notification settings

jmlacroix/rubbissh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages