Skip to main content

Add keys to SSH Agent

Project description

Version: 0.3.0
Released: 2020-10-19

AddSSHkeys adds all of your keys to SSH Agent in one operation. It can work with Avendesora to keep your passphrases secure.

Please report all bugs and suggestions to addsshkeys@nurdletech.com

Getting Started

You download and install AddSSHkeys with:

pip3 install --user addsshkeys

Once installed, you will need at least one configuration file. Configurations are placed in: ~/.config/addsshkeys. They are NestedText files. The default configuration is config; the default file is config.nt.

The following settings may be given in your config files.

ssh_add

The name of the command that adds keys to your SSH agent. By default, ‘ssh-add’ is used.

ssh_keys

This setting is required. It contains a dictionary of dictionaries that contains information about each key. The primary dictionary contains a name and the values for each key. The values are held in a dictionary that may contain three fields:

paths

This is required and contains the paths to one or more SSH private key files. It may be a list of strings, or a single string that is split. If a relative path is given, it is relative to ~/.ssh.

account

This gives the name of the Avendesora account that holds passphrase for the keys. If present, Avendesora will be queried for the passphrase.

passphrase

This is required if account is not given, otherwise it is optional. If account is given, it is the name of the passphrase field in Avendesora, which defaults to ‘passcode’. If account is not given, it is the passphrase itself. In this case, the settings file should only be readable by the user.

config_file_mask

An integer that determines if a warning should be printed about the config file permissions being too loose. The permissions are only checked if the file is found to contain a passphrase. Default is 0o077. Set to 0o000 to disable the warning. Set to 0o077 to generate a warning if the configuration directory is readable or writable by the group or others. Set to 0o007 to generated a warning if the directory is readable or writable by others.

Here is an example configuration file:

ssh_keys:
    primary:
        paths: primary-ed25519 primary-rsa
        account: primary-ssh-key
    digitalocean:
        paths: digitalocean
        account: digitalocean-ssh-key
    github:
        paths: github
        passphrase: canard apply trousseau forgive
    backups:
        paths: dumper
        account: dumper-ssh-key

Running AddSSHkeys

Once configured, you can run AddSSHkeys with the default configuration using:

addsshkeys

And you can run it with a particular configuration using:

addsshkeys <config>

where <config> is the name of the configuration you wish to use (no need to give the .nt suffix). In this way you can have several bundles of keys that you can load as needed.

Releases

Latest Development Version:
Version: 0.3.0
Released: 2020-10-19
0.3 (2020-10-19)
  • allow config file to end with .nt suffix.

0.2 (2020-10-14)
  • update to latest version of NestedText

0.1 (2020-08-31)
  • convert to NestedText for settings file.

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

addsshkeys-0.3.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

addsshkeys-0.3.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file addsshkeys-0.3.0.tar.gz.

File metadata

  • Download URL: addsshkeys-0.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.9

File hashes

Hashes for addsshkeys-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d036bdaa90822cfb9d95e53820102b7ca1ed2362a6448260ee24a0def117310e
MD5 2bfcbeebfc73cef770d322742e4a85cf
BLAKE2b-256 f0a9e355da52d8d944a2547ec1dc70b9679f78ff5e8de20a4c4a36acb63c21ec

See more details on using hashes here.

File details

Details for the file addsshkeys-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: addsshkeys-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.9

File hashes

Hashes for addsshkeys-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8775671ff5ed440689f426eb56c530cf64ddf5e3371a215a19fdc9e115b3e840
MD5 6aac8a28b24eafaea3f1dc189f5f83b9
BLAKE2b-256 b6b77563968927a6bcbbcb4b329353f37fe39e3bf1ac1f9cbe5d026d0e48611f

See more details on using hashes here.

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