Dump JSON for your ssh config include IdentityFiles and restore those.
Project description
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, port to CI and share with others in the project.
Getting Started
SSH Config JSON uses The Python Package Index(Pypi), so that you can use pip installer.
pip installer
$ pip install ssh-config-json
Usage
You 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]
scj restore <file> [-c|--config=<config>] [-i|--identityFile]
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
Ex1) Dump your SSH Config to JSON
$ scj dump dump_config.json
Ex2) Dump your SSH Config to JSON with IdentityFiles
$ scj dump dump_config.json -i
Ex3) Restore JSON to SSH Config
$ scj restore dump_config.json
Ex4) Restore JSON to SSH Config with IdentityFiles
$ scj restore dump_config.json -i
Testing
Unit Test
Using pytest, if you want to unit testing.
$ pytest
If you want to get coverage report, run coverage and check the report.
$ coverage run --source=ssh_config_json -m pytest
$ coverage report -m
Integration Test
Using pytest, if you want to do integrated tests with mark “–it”.
$ pytest --it
With tox
With tox, you can test multiple python version.(only python 3.6, 3.7, 3.8)
$ tox
Document
The Document write by mkdocs.
Licence
This software is released under the MIT License, see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ssh_config_json-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c7dc6a445a99b60d445e8dfa1a25abdea35376128f469b515c02db372e5e222 |
|
MD5 | 6adf95eace6c844de341e38ddf1160d2 |
|
BLAKE2b-256 | 53975813da8d6b053676b9cb9ca64d4a0d4c790e4138be5f831c59df175c57ad |