Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

ssh client config manager

Project description

SSH Config

PyPI version Build Status

SSH client config file manager

What is ssh_config?


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.


Python 2.7, 3.6, 3.7


$ pip install ssh-config



        ssh-config [options] [COMMAND] [ARGS...]

        -h --help           Show this screen.
        -v --version        Show version.
        -f --config FILE    Specify an ssh client file [default: ~/.ssh/config]

        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


List hosts

$ ssh-config ls 
# It shows name and HostName attribute
*: None
Add host
$ ssh-config add "server_cmd_4" HostName= 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
Update hosts with pattern
$ ssh-config add --update -p "server_*" IdentityFile="~/.ssh/cmd_id_rsa"

add ssh key to multiple servers

ssh-config ls --only-name | xargs -I{} ssh-copy-id -i ~/.ssh/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.

Filename, size & hash SHA256 hash help File type Python version Upload date
ssh_config-0.0.12-py3-none-any.whl (9.3 kB) Copy SHA256 hash SHA256 Wheel py3
ssh_config-0.0.12.tar.gz (8.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page