SSH Config JSON is dumping JSON for your ssh config include IdentityFiles and restoring those.
SSH Config JSON enables you to pack and restore your SSH Config and Private Key in JSON format,
allowing you to backup, put to CI and share with others in the project.
- Dumping your SSH Config to JSON and restore it
- Packing up IdentityFiles with the JSON
- AES encrypting with the JSON to enable pushing and saving public GitHub Repository
SSH Config JSON uses The Python Package Index(Pypi), so that you can use pip installer.
$ pip install ssh-config-jsonYou can use global command scj .
Show help.
$ scj -h
SSH Config JSON
Overview:
Dump JSON for your ssh config include IdentityFiles and restore those.
Usage:
scj [-h|--help] [-v|--version]
scj dump <file> [-c|--config=<config>] [-i|--identityFile] [-e|--encrypt] [--key=<key>]
scj restore <file> [-c|--config=<config>] [-i|--identityFile] [-d|--decrypt=<key>]
Options:
dump : dump SSH Config file to JSON
restore : Restore SSH Config file from JSON
<file> : Dumped json file
-h, --help : Help
-v, --version : Show version
-c, --config=<config> : Specific SSH Config file path [default: ~/.ssh/config]
-i, --identityFile : Include IdentityFiles
-e, --encrypt : Encrypt JSON dump with AES
--key=<key> : Set specify key string
-d, --decrypt=<key> : Decrypt JSON dump with AESEx1) Dump your SSH Config to JSON
$ scj dump dump_config.jsonEx2) Dump your SSH Config to JSON with IdentityFiles
$ scj dump dump_config.json -iEx3) Restore JSON to SSH Config
$ scj restore dump_config.jsonEx4) Restore JSON to SSH Config with IdentityFiles
$ scj restore dump_config.json -iEx5) Dump your SSH Config to JSON with AES Encrypt
$ scj dump dump_config.json -i -e
Encrypt key: 1mado1wmf9amsie0jvo0kfmai9cjasfv # <= This is the "Key"!!Ex6) Decrypt it
$ scj restore dump_config.json -i -d 1mado1wmf9amsie0jvo0kfmai9cjasfvUsing pytest, if you want to unit testing.
$ pytestIf you want to get coverage report, run coverage and check the report.
$ coverage run --source=ssh_config_json -m pytest
$ coverage report -mUsing pytest, if you want to do integrated tests with mark "--it".
$ pytest --itWith tox, you can test multiple python version.(only python 3.6, 3.7, 3.8)
$ toxThe Document is HERE written by mkdocs.
This software is released under the MIT License, see LICENSE.