addsshkeys


Nameaddsshkeys JSON
Version 0.5 PyPI version JSON
download
home_pagehttps://github.com/kenkundert/addsshkeys
SummaryAdd keys to SSH Agent
upload_time2023-04-20 20:47:57
maintainer
docs_urlNone
authorKen Kundert
requires_python>=3.8
licenseGPLv3+
keywords avendesora ssh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            AddSSHkeys — Add Keys to SSH Agent
==================================

.. image:: https://pepy.tech/badge/addsshkeys/month
    :target: https://pepy.tech/project/addsshkeys

.. image:: https://img.shields.io/pypi/v/addsshkeys.svg
    :target: https://pypi.python.org/pypi/addsshkeys

.. image:: https://img.shields.io/pypi/pyversions/addsshkeys.svg
    :target: https://pypi.python.org/pypi/addsshkeys

| Version: 0.5
| Released: 2023-04-20
|

*AddSSHkeys* adds all of your keys to SSH Agent in one operation.
It is helpful if you routinely add more than one key to your agent.
It can work with `Avendesora <https://avendesora.readthedocs.io>`_ to keep your 
passphrases secure.

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

Getting Started
---------------

Download and install *AddSSHkeys* with::

    pip install addsshkeys

Once installed, you will need at least one configuration file.
Configurations are placed in: ~/.config/addsshkeys.
They are `NestedText <https://nestedtext.org>`_ 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 077.
Set to 000 to disable the warning.
Set to 077 to generate a warning if the configuration directory is readable or 
writable by the group or others.
Set to 007 to generated a warning if the directory is readable or writable by 
others.

**auth_sock_path**

If given, the value of $SSH_AUTH_SOCKET is written to the specified path.
This can be useful when running SSH related commands in cron and anacron 
scripts.


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

    # assure config file is only readable by me
    config_file_mask: 077

    # used to provide path to SSH authorization socket to scripts run by cron
    auth_sock_path: ~/.ssh/auth-sock

Underscores can be replaced by spaces in all keys.

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.5
    | Released: 2023-04-20

0.5 (2023-04-20)
    - added *auth_sock_path*.

0.4 (2020-10-19)
    - fix *config_file_mask*.

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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kenkundert/addsshkeys",
    "name": "addsshkeys",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "avendesora,ssh",
    "author": "Ken Kundert",
    "author_email": "addsshkeys@nurdletech.com",
    "download_url": "https://files.pythonhosted.org/packages/09/10/6db3865ebb61a2b1070f403f39c003f258a643e417dcb1bdcc95f332242b/addsshkeys-0.5.tar.gz",
    "platform": null,
    "description": "AddSSHkeys \u2014 Add Keys to SSH Agent\n==================================\n\n.. image:: https://pepy.tech/badge/addsshkeys/month\n    :target: https://pepy.tech/project/addsshkeys\n\n.. image:: https://img.shields.io/pypi/v/addsshkeys.svg\n    :target: https://pypi.python.org/pypi/addsshkeys\n\n.. image:: https://img.shields.io/pypi/pyversions/addsshkeys.svg\n    :target: https://pypi.python.org/pypi/addsshkeys\n\n| Version: 0.5\n| Released: 2023-04-20\n|\n\n*AddSSHkeys* adds all of your keys to SSH Agent in one operation.\nIt is helpful if you routinely add more than one key to your agent.\nIt can work with `Avendesora <https://avendesora.readthedocs.io>`_ to keep your \npassphrases secure.\n\nPlease report all bugs and suggestions to addsshkeys@nurdletech.com\n\nGetting Started\n---------------\n\nDownload and install *AddSSHkeys* with::\n\n    pip install addsshkeys\n\nOnce installed, you will need at least one configuration file.\nConfigurations are placed in: ~/.config/addsshkeys.\nThey are `NestedText <https://nestedtext.org>`_ files.\nThe default configuration is *config*; the default file is *config.nt*.\n\nThe following settings may be given in your config files.\n\n**ssh_add**\n\nThe name of the command that adds keys to your SSH agent.\nBy default, 'ssh-add' is used.\n\n**ssh_keys**\n\nThis setting is required.\nIt contains a dictionary of dictionaries that contains information about each \nkey.\nThe primary dictionary contains a name and the values for each key.\nThe values are held in a dictionary that may contain three fields:\n\n*paths*\n\nThis is required and contains the paths to one or more SSH private key files.\nIt may be a list of strings, or a single string that is split.\nIf a relative path is given, it is relative to ~/.ssh.\n\n*account*\n\nThis gives the name of the Avendesora account that holds passphrase for the \nkeys.\nIf present, Avendesora will be queried for the passphrase.\n\n*passphrase*\n\nThis is required if *account* is not given, otherwise it is optional.\nIf *account* is given, it is the name of the passphrase field in Avendesora, \nwhich defaults to 'passcode'.\nIf account is not given, it is the passphrase itself.\nIn this case, the settings file should only be readable by the user.\n\n**config_file_mask**\n\nAn integer that determines if a warning should be printed about the config file \npermissions being too loose.\nThe permissions are only checked if the file is found to contain a passphrase.\nDefault is 077.\nSet to 000 to disable the warning.\nSet to 077 to generate a warning if the configuration directory is readable or \nwritable by the group or others.\nSet to 007 to generated a warning if the directory is readable or writable by \nothers.\n\n**auth_sock_path**\n\nIf given, the value of $SSH_AUTH_SOCKET is written to the specified path.\nThis can be useful when running SSH related commands in cron and anacron \nscripts.\n\n\nHere is an example configuration file::\n\n    ssh_keys:\n        primary:\n            paths: primary-ed25519 primary-rsa\n            account: primary-ssh-key\n        digitalocean:\n            paths: digitalocean\n            account: digitalocean-ssh-key\n        github:\n            paths: github\n            passphrase: canard apply trousseau forgive\n        backups:\n            paths: dumper\n            account: dumper-ssh-key\n\n    # assure config file is only readable by me\n    config_file_mask: 077\n\n    # used to provide path to SSH authorization socket to scripts run by cron\n    auth_sock_path: ~/.ssh/auth-sock\n\nUnderscores can be replaced by spaces in all keys.\n\nRunning AddSSHkeys\n------------------\n\nOnce configured, you can run *AddSSHkeys* with the default configuration using::\n\n    addsshkeys\n\nAnd you can run it with a particular configuration using::\n\n    addsshkeys <config>\n\nwhere ``<config>`` is the name of the configuration you wish to use (no need to \ngive the .nt suffix).\nIn this way you can have several bundles of keys that you can load as needed.\n\n\nReleases\n--------\n**Latest Development Version**:\n    | Version: 0.5\n    | Released: 2023-04-20\n\n0.5 (2023-04-20)\n    - added *auth_sock_path*.\n\n0.4 (2020-10-19)\n    - fix *config_file_mask*.\n\n0.3 (2020-10-19)\n    - allow config file to end with .nt suffix.\n\n0.2 (2020-10-14)\n    - update to latest version of NestedText\n\n0.1 (2020-08-31)\n    - convert to NestedText for settings file.\n",
    "bugtrack_url": null,
    "license": "GPLv3+",
    "summary": "Add keys to SSH Agent",
    "version": "0.5",
    "split_keywords": [
        "avendesora",
        "ssh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4d835f652e9fd1eb3eb74691335e72bb9fddc7a4e34560ed0df57bad2912d7e",
                "md5": "6d9b33dc0f3e3a44617a89f1f0951040",
                "sha256": "a8fd3d5a71f52b2161e8023f91f1d69d2cb67a019bad819ed33d9aa596d0bd0f"
            },
            "downloads": -1,
            "filename": "addsshkeys-0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d9b33dc0f3e3a44617a89f1f0951040",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5735,
            "upload_time": "2023-04-20T20:47:26",
            "upload_time_iso_8601": "2023-04-20T20:47:26.516171Z",
            "url": "https://files.pythonhosted.org/packages/a4/d8/35f652e9fd1eb3eb74691335e72bb9fddc7a4e34560ed0df57bad2912d7e/addsshkeys-0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09106db3865ebb61a2b1070f403f39c003f258a643e417dcb1bdcc95f332242b",
                "md5": "3b6aec391dab93b6693a407dad9b05d3",
                "sha256": "ee03c4b6fd9fade84b58fe429332ea7988b5a8dd0ec046b8b1e95cb91f7eff05"
            },
            "downloads": -1,
            "filename": "addsshkeys-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "3b6aec391dab93b6693a407dad9b05d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5508,
            "upload_time": "2023-04-20T20:47:57",
            "upload_time_iso_8601": "2023-04-20T20:47:57.059211Z",
            "url": "https://files.pythonhosted.org/packages/09/10/6db3865ebb61a2b1070f403f39c003f258a643e417dcb1bdcc95f332242b/addsshkeys-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-20 20:47:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "kenkundert",
    "github_project": "addsshkeys",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "addsshkeys"
}
        
Elapsed time: 0.28116s