Skip to content

set up a working ssh-agent and add keys for any sub-processes you want to run in Python

License

Notifications You must be signed in to change notification settings

tanxi/ssh-agent-setup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH Agent Setup

Sometimes you want to run some SSH subprocesses. It is convenient to use ssh-agent to hold your keys instead of passing them as arguments to said subprocesses. However, ssh-agent is not always available with zero configuration, due to various environment issues. This library offers an easy way to make sure you have ssh-agent at your disposal.

Installation

pip install ssh-agent-setup

Features

Make sure ssh-agent is available (start one if needed)

import ssh_agent_setup
ssh_agent_setup.setup()

Add a private key (and identity) to the ssh-agent:

ssh_agent_setup.addKey( '/path/to/my_key_rsa' )

If an ssh-agent was started by ssh_agent_setup, it will be killed when the process exists via atexit.

About

set up a working ssh-agent and add keys for any sub-processes you want to run in Python

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 98.7%
  • Shell 1.3%