Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haarcuba/ssh-agent-setup
set up a working ssh-agent and add keys for any sub-processes you want to run in Python
https://github.com/haarcuba/ssh-agent-setup
Last synced: about 15 hours ago
JSON representation
set up a working ssh-agent and add keys for any sub-processes you want to run in Python
- Host: GitHub
- URL: https://github.com/haarcuba/ssh-agent-setup
- Owner: haarcuba
- License: mit
- Created: 2017-08-23T09:47:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-11T00:37:11.000Z (almost 2 years ago)
- Last Synced: 2023-08-04T08:22:26.781Z (over 1 year ago)
- Language: Python
- Size: 34.2 KB
- Stars: 18
- Watchers: 4
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)
```python
import ssh_agent_setup
ssh_agent_setup.setup()
```Add a private key (and identity) to the `ssh-agent`:
```python
ssh_agent_setup.add_key( '/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`.