SSH Config
SSH client config file manager
What is ssh_config?
https://linux.die.net/man/5/ssh_config
Why
I don't remember all the servers I am managing. Also all servers require all different configurations to connect to it. I know ~.ssh/config can handle this kind of issue. I want it to handle this file easier.
Yes, I am not sure this is easier way to handle it. but I am trying.
Requirements
After 0.0.15, Python27 is not supported.
Python 3.6 or higher
Installation
pip3 install ssh-config
Usage
Usage: ssh-config [OPTIONS] COMMAND [ARGS]...
Options:
-f, --path TEXT [default: /Users/jonghak.choi/.ssh/config]
--debug / --no-debug
--version Show the version and exit.
--help Show this message and exit.
Commands:
add Add SSH Config into config file
attributes Print possible attributes for Host
gen Generate the ssh config
get Get ssh config with name
ls Enumerate the configs
remove
rename
ssh Interative shell for Host
update Update the ssh Host config Attribute key=value format
Use-cases
List hosts
$ ssh-config ls
server1
server_cmd_1
server_cmd_2
server_cmd_3
$ ssh-config ls -l
server1 10.0.2.10
server_cmd_1 10.0.1.11
server_cmd_2 10.0.1.12
server_cmd_3 10.0.1.13
Add host
$ ssh-config add "server_cmd_4" HostName=203.0.113.77 IdentityFile="~/.ssh/cmd_id_rsa"
Update host
$ ssh-config update "server_cmd_3" IdentityFile="~/.ssh/cmd_id_rsa"
Remove host
$ ssh-config remove "server_3"
Using pattern to get list or update exist hosts
add ssh key to multiple servers
ssh-config ls | xargs -I{} ssh-copy-id -i ~/.ssh/id_rsa {}
Export ssh-config to ansible inventory ini format.
ssh-config inventory --list|--host <hostname>
Metadata
Release files for ssh-config 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ssh_config-0.1.4.tar.gz | 16.2 kB | Without provenance | Details for ssh_config-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ssh_config-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for ssh_config-0.1.4-py3-none-any.whl |
Total release size: 33.8 kB
Release files / ssh_config-0.1.4.tar.gz
| Download URL | ssh_config-0.1.4.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db323af9e3a0f220f4ca28127a0ee082d76fbea6edc45b48080e84944fb09656
|
|
BLAKE2b-256 checksum How to use checksums |
e6a2b014388969d7ddd9cc8905a1c48816e66a10b27d81a12b700fbe0489dadd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / ssh_config-0.1.4-py3-none-any.whl
| Download URL | ssh_config-0.1.4-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e41afa1662ea7483050c6dbd307b8a5b6f4f4c516334f602665deecfdff5a557
|
|
BLAKE2b-256 checksum How to use checksums |
2e76c6cb06ed7b1bc1822148ae699177d5479ad07d48e5f09d0349e329ea6645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for ssh-config 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.