Skip to main content

SSH Config JSON

SSH Config JSON is dumping JSON for your ssh config include IdentityFiles and restoring those.


LICENSE PR Welcomes GitHub Actions Coverage PyPI downloads pip Version Python Version pip Format Documentation Status Black Format

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.

Features

  • 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

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] [-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 AES

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

Ex5) 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 1mado1wmf9amsie0jvo0kfmai9cjasfv

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

Documents

The Document is HERE written by mkdocs.

Licence

This software is released under the MIT License, see LICENSE.

Changelog

v1.0.0 (2020-11-11)

  • First release.

Metadata

Release files for ssh-config-json 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssh-config-json 1.0.1
File Size Uploaded
ssh_config_json-1.0.1.tar.gz 9.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ssh-config-json 1.0.1
File Interpreter ABI Platform
ssh_config_json-1.0.1-py3.8.egg Legacy Egg format - - Details
ssh_config_json-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 30.2 kB

Release files / ssh_config_json-1.0.1.tar.gz

Download URL ssh_config_json-1.0.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
95d0c3f0fce3efbb2d35353dc4365eb478b55349ff73766cdc1ed89f4fd23242
BLAKE2b-256 checksum
How to use checksums
f36f1ec63d59a65b531c0c3749f47c14c81b4a291f696b617c08fc2319a4faa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Release files / ssh_config_json-1.0.1-py3.8.egg

Download URL ssh_config_json-1.0.1-py3.8.egg
Size 13.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
6dfab940017ee29cdf21d6aafeb4f42034811c8245aa9eab727db88a0ab182aa
BLAKE2b-256 checksum
How to use checksums
e08f9b8c9ee8b108cb594ce401e0bd4f38a5f517422281ba6ee91f51418847b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Release files / ssh_config_json-1.0.1-py2.py3-none-any.whl

Download URL ssh_config_json-1.0.1-py2.py3-none-any.whl
Size 7.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
cfdf945b74a7d3f57cbb50b3f5fe278778e4c3a8210950c0f38e3326a6fe3e26
BLAKE2b-256 checksum
How to use checksums
d88f356b2e3136e397fdb3ea1eae66760180f0a2a53d56973a06713e8f3c1daf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

1.0.1 This release

3 release files

1.0.0

3 release files

0.1.3

3 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page