ssh client config manager
Project description
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 requires all different configuration to connec 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 eaiser way to handle it. but I am trying.
Usage
ssh_config.
Usage:
ssh_config.py [options] [COMMAND] [ARGS...]
Options:
-h --help Show this screen.
-v --version Show version.
-f --config FILE Specify an ssh client file [default: ~/.ssh/config]
Commands:
ls Show list of Hosts in client file
add Add new Host configuration
rm Remove exist Host configuration
import Import Hosts from csv file to SSH Client config
version Show version information
Use-cases
List hosts
$ ssh_config ls
# It shows name and HostName attribute
server1: 203.0.113.76
*: None
server_cmd_1: 203.0.113.76
server_cmd_2: 203.0.113.76
server_cmd_3: 203.0.113.76
Add host
$ ssh_config add "server_cmd_4" HostName=203.0.113.77 IdentityFile="~/.ssh/cmd_id_rsa"
Update host
$ ssh_config add --update -p "server_cmd_3" IdentityFile="~/.ssh/cmd_id_rsa"
Remove host
$ ssh_config rm "server_3"
Using pattern to get list or update exist hosts
List hosts with pattern
$ ssh_config ls "server_*"
# It shows name and HostName attribute
server_cmd_1: 203.0.113.76
server_cmd_2: 203.0.113.76
server_cmd_3: 203.0.113.76
Update hosts with pattern
$ ssh_config add --update -p "server_*" IdentityFile="~/.ssh/cmd_id_rsa"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ssh_config-0.0.8.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for ssh_config-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ef449bf2c912617031340650a3efcab90f283638ca35aaaf46c320bdf97410f |
|
MD5 | 66381d63bbae3674071c59ba26d3faee |
|
BLAKE2b-256 | 7bcf9180858edc9433746937b253857a66d2299a3408eaa9b27aaa0ce133109d |