Skip to main content

ssh client config manager

Project description

SSH Config

PyPI version Build Status

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.

Requirements

Python 2.7, 3.6, 3.7

Installation

$ pip install ssh-config

Usage

ssh-config.

    Usage:
        ssh-config [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
        update      UPdate Host configuration
        rm          Remove exist Host configuration
        import      Import Hosts from csv file to SSH Client config
        init        Create ~/.ssh/config file
        host        Get Host information
        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


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.9.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

ssh_config-0.0.9-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file ssh_config-0.0.9.tar.gz.

File metadata

  • Download URL: ssh_config-0.0.9.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for ssh_config-0.0.9.tar.gz
Algorithm Hash digest
SHA256 3f4b6f029f59b5b9324c170ed48c98f68c1c9dbeefd832ebb692c1fcfd92d482
MD5 e923b4b91bc7fba4a76a5d8a1ed2979b
BLAKE2b-256 71f02e435bfa30a52b82515c3cfeaffc3d492c61c4ae36218ca2b4710587e094

See more details on using hashes here.

Provenance

File details

Details for the file ssh_config-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: ssh_config-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for ssh_config-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 cbb04bff09bc68c9f313bac3ff8835083aa6c608973eb2490e16ea0b063e53d1
MD5 23c16ecc4f76a0d2f013aefb8d8dc12f
BLAKE2b-256 8e3c41affd23045056ed5a2ef139d6c83956613da22757807ea231d47e0e6052

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page