Skip to content

User4574/sshconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSHConfig

This is a gem which allows you to programatically configure your ~/.ssh/config.

It’s a bit bad, but it works.

Config file

Your new file to worry about is ~/.ssh/sshconfig.

ssh-update-config

The ssh-update-config command will generate the ~/.ssh/config file for you. The file will be overwritten.

Directives

In the block you pass to a host method, any method becomes an sshconfig directive. It’s method_missing_madness!

It’s all ruby!

So write ruby!

Methods, loops, variables; you name it.

$hostlist variable

The grand list of hosts is stored in $hostlist. It’s a Hosts object. You can touch this. The hosts {} method appends to this list. $hostlist.host{} does the same as hosts{host{}}.

Building

  gem build sshconfig.gemspec
  gem install --user-install sshconfig

Example

There’s an example file, take a look.

About

A Ruby DSL for generating SSH configs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages