All Projects → awendt → Poet

awendt / Poet

Licence: mit
Lets you split your ssh_config into separate files

Projects that are alternatives of or similar to Poet

Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (+768.06%)
Mutual labels:  command-line, ssh
Git Town
Generic, high-level Git workflow support!
Stars: ✭ 1,937 (+2590.28%)
Mutual labels:  command-line, gherkin
Cdist
usable configuration management
Stars: ✭ 210 (+191.67%)
Mutual labels:  configuration-management, ssh
Dry Cli
General purpose Command Line Interface (CLI) framework for Ruby
Stars: ✭ 210 (+191.67%)
Mutual labels:  command-line, rubygem
Hss
An interactive parallel ssh client featuring autocomplete and asynchronous execution.
Stars: ✭ 248 (+244.44%)
Mutual labels:  command-line, ssh
Manssh
Manage your ssh alias configs easily.
Stars: ✭ 226 (+213.89%)
Mutual labels:  command-line, ssh
Mac
macOS Mojave v. 10.14 setup for developers.
Stars: ✭ 209 (+190.28%)
Mutual labels:  command-line, ssh
Linux Command
Linux命令大全搜索工具,内容包含Linux命令手册、详解、学习、搜集。https://git.io/linux
Stars: ✭ 17,481 (+24179.17%)
Mutual labels:  command-line, ssh
Conf
Simple config handling for your app or module
Stars: ✭ 707 (+881.94%)
Mutual labels:  command-line, configuration-management
Module Security Public
The public documentation for the gruntwork-io/module-security repo, which contains packages for setting up best practices for managing secrets, credentials, and servers
Stars: ✭ 67 (-6.94%)
Mutual labels:  ssh
Reportbuilder
Ruby gem to merge Cucumber JSON reports and build mobile-friendly HTML Test Report, JSON report and retry file.
Stars: ✭ 69 (-4.17%)
Mutual labels:  rubygem
Guaka
The smartest and most beautiful (POSIX compliant) Command line framework for Swift 🤖
Stars: ✭ 1,145 (+1490.28%)
Mutual labels:  command-line
Str metrics
Ruby gem (native extension in Rust) providing implementations of various string metrics
Stars: ✭ 68 (-5.56%)
Mutual labels:  rubygem
The forge
Our groundbreaking, lightning fast PWA CLI tool
Stars: ✭ 70 (-2.78%)
Mutual labels:  command-line
Cascadia
Go cascadia package command line CSS selector
Stars: ✭ 67 (-6.94%)
Mutual labels:  command-line
Taskell
Command-line Kanban board/task manager with support for Trello boards and GitHub projects
Stars: ✭ 1,175 (+1531.94%)
Mutual labels:  command-line
Mocha Chrome
☕️ Run Mocha tests using headless Google Chrome
Stars: ✭ 66 (-8.33%)
Mutual labels:  command-line
Vagrant Cloudstack
Use Vagrant to manage your Cosmic or Cloudstack instances.
Stars: ✭ 65 (-9.72%)
Mutual labels:  rubygem
Yes
yes - Implementation of simple and dangerous yes command in various languages. 👍
Stars: ✭ 72 (+0%)
Mutual labels:  command-line
Pyinfra
pyinfra automates infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployment, configuration management and more.
Stars: ✭ 1,168 (+1522.22%)
Mutual labels:  configuration-management

Native support in OpenSSH 7.3

OpenSSH 7.3 was released on August 1, 2016. That version features an Include directive for ssh_config(5) files which is documented as follows:

Include the specified configuration file(s). Multiple pathnames may be specified and each pathname may contain glob(3) wildcards and, for user configurations, shell-like “~” references to user home directories. Files without absolute paths are assumed to be in ~/.ssh if included in a user configuration file or /etc/ssh if included from the system configuration file. Include directive may appear inside a Match or Host block to perform conditional inclusion.

This covers most use cases poet was designed for. As of February 2018, this repo is officially unmaintained.

Feel free to fork it.

Migrating away from poet

If you want to migrate from poet to this native support, back up your ~/.ssh/config and use the new directive:

$ ssh -V # make sure you have at least 7.3
OpenSSH_7.4p1, LibreSSL 2.5.0
$ cd .ssh
$ mv config config.poet # back up your existing config generated by poet
$ echo "Include config.d/*" > config # Use the new directive

Split your ssh_config into separate files!

Getting started

$ gem install poet
$ poet bootstrap

This will move your ~/.ssh/config into ~/.ssh/config.d/ and create an identical ~/.ssh/config. Organize files in ~/.ssh/config.d/ any way you want (just remember to re-run poet afterwards).

To edit ~/.ssh/config.d/some_file, run poet edit some_file. Poet will open your favorite $EDITOR and automatically create a new ~/.ssh/config when you quit the editor.

Advanced usage

Poet won't touch your existing ssh_config. If you want to play with it, pass a different filename to the "-o" option. Or move your existing config out of the way.

Bash completion

A Bash-compatible completion script is available for all commands and some of their arguments, most notably for poet edit.

Run poet completeme to copy the script to $HOME/.bash_completion.d/. The command outputs instructions how to properly source the file.

Un-ignoring files

Stanzas under ~/.ssh/config.d/ with an extension of .disabled are ignored by default. Every now and then, when you do need it, run poet --with CONFIG to explicitly include CONFIG.disabled in your generated ssh_config. You can even include several by running several --with options or using --with CONFIG1,CONFIG2.

Use poet ls (or poet ls --tree) to see a list (or tree) of all your config files.

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Send me a pull request. Bonus points for topic branches.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].