authkeyman


Nameauthkeyman JSON
Version 1.1.0.post1 PyPI version JSON
download
home_pagehttps://github.com/TacticalLaptopBag/authkeyman
SummaryQuickly manage your authorized public SSH keys
upload_time2025-07-26 13:52:10
maintainerNone
docs_urlNone
authorTactical Laptop Bag
requires_python>=3.9
licenseGPL-3.0-only
keywords authorized_keys ssh cli command-line command line tool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # authkeyman
A simple command-line tool to make managing your `~/.ssh/authorized_keys` file easier.

- [authkeyman](#authkeyman)
  - [Features](#features)
  - [Install](#install)
  - [Uninstall](#uninstall)
  - [Usage](#usage)
    - [Add Keys](#add-keys)
    - [Remove Keys](#remove-keys)
    - [List Keys](#list-keys)
    - [Perform Actions on Other Users](#perform-actions-on-other-users)


## Features
- Add keys to your `authorized_keys` file.
- Remove keys from your `authorized_keys` file by key comment.
- Add and remove keys from other users when running as `root`.


## Install
If you don't need to manage other users' `authorized_keys` files,
then simply install with `pipx`:
```bash
pipx install authkeyman
```

Otherwise, install the tool system-wide by running this command:
```bash
curl -L https://raw.githubusercontent.com/TacticalLaptopBag/authkeyman/refs/heads/main/curl-install.sh | sudo bash
```


## Uninstall
If you installed with `pipx`, simply use that to uninstall:
```bash
pipx uninstall authkeyman
```

If you installed using the `curl-install.sh` script, use this command:
```bash
curl -L https://raw.githubusercontent.com/TacticalLaptopBag/authkeyman/refs/heads/main/curl-uninstall.sh | sudo bash
```


## Usage

### Add Keys
Add keys to the `authorized_keys` file:
```bash
authkeyman add "ssh-ed25519 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX your-key-name"
```

Note that the key is wrapped in quotes.

You can also add multiple keys at once by stringing them together:
```bash
authkeyman add "ssh-ed25519 ... key1" "ssh-ed25519 ... key2" ...
```


### Remove Keys
Remove keys from the `authorized_keys` file by using its comment:
```bash
authkeyman remove your-key-name
```

You can remove multiple keys at once:
```bash
authkeyman remove key1 key2
```

You can also use partial comments and `authkeyman` will prompt you
if the matching key is the one you want to remove:
```bash
authkeyman remove key-name
```
```
No keys found commented with 'key-name', but a similar key was found:
your-key-name

Would you like to use this one instead? (y/N):
```

If multiple keys match, it will ask you to make a decision:
```bash
authkeyman remove key
```
```
No keys found commented with 'key', but these similar keys were found:
[0]: key1
[1]: key2

Which one would you like to use instead? (Default 0, make a selection 0-1): 
```

Running this command with `-y` will skip the prompt and remove the key.
If multiple keys match, it will delete the first key that matches.


### List Keys
Lists all key comments in the `authorized_keys` file:
```bash
authkeyman list
```
```
Keys in /home/user/.ssh/authorized_keys:
key1
key2
```


### Perform Actions on Other Users
You can run all of these commands on other users
when running `authkeyman` as `root` and specifying the `--user` flag:
```bash
sudo authkeyman --user user1 add "ssh-ed25519 ... user1s-key"
```

You can add additional `--user` flags to specify multiple users:
```bash
sudo authkeyman --user user1 --user user2 add "ssh-ed25519 ... users-key"
```
Note that the `--user` flags must come directly after `authkeyman`
and cannot come after a subcommand.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TacticalLaptopBag/authkeyman",
    "name": "authkeyman",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "authorized_keys, ssh, cli, command-line, command, line, tool",
    "author": "Tactical Laptop Bag",
    "author_email": "tacticallaptopbag@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f5/70/dbe53628551eab56979c42c3d7bd03ea7a37e5941397e31bdd18f26bdfd2/authkeyman-1.1.0.post1.tar.gz",
    "platform": null,
    "description": "# authkeyman\nA simple command-line tool to make managing your `~/.ssh/authorized_keys` file easier.\n\n- [authkeyman](#authkeyman)\n  - [Features](#features)\n  - [Install](#install)\n  - [Uninstall](#uninstall)\n  - [Usage](#usage)\n    - [Add Keys](#add-keys)\n    - [Remove Keys](#remove-keys)\n    - [List Keys](#list-keys)\n    - [Perform Actions on Other Users](#perform-actions-on-other-users)\n\n\n## Features\n- Add keys to your `authorized_keys` file.\n- Remove keys from your `authorized_keys` file by key comment.\n- Add and remove keys from other users when running as `root`.\n\n\n## Install\nIf you don't need to manage other users' `authorized_keys` files,\nthen simply install with `pipx`:\n```bash\npipx install authkeyman\n```\n\nOtherwise, install the tool system-wide by running this command:\n```bash\ncurl -L https://raw.githubusercontent.com/TacticalLaptopBag/authkeyman/refs/heads/main/curl-install.sh | sudo bash\n```\n\n\n## Uninstall\nIf you installed with `pipx`, simply use that to uninstall:\n```bash\npipx uninstall authkeyman\n```\n\nIf you installed using the `curl-install.sh` script, use this command:\n```bash\ncurl -L https://raw.githubusercontent.com/TacticalLaptopBag/authkeyman/refs/heads/main/curl-uninstall.sh | sudo bash\n```\n\n\n## Usage\n\n### Add Keys\nAdd keys to the `authorized_keys` file:\n```bash\nauthkeyman add \"ssh-ed25519 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX your-key-name\"\n```\n\nNote that the key is wrapped in quotes.\n\nYou can also add multiple keys at once by stringing them together:\n```bash\nauthkeyman add \"ssh-ed25519 ... key1\" \"ssh-ed25519 ... key2\" ...\n```\n\n\n### Remove Keys\nRemove keys from the `authorized_keys` file by using its comment:\n```bash\nauthkeyman remove your-key-name\n```\n\nYou can remove multiple keys at once:\n```bash\nauthkeyman remove key1 key2\n```\n\nYou can also use partial comments and `authkeyman` will prompt you\nif the matching key is the one you want to remove:\n```bash\nauthkeyman remove key-name\n```\n```\nNo keys found commented with 'key-name', but a similar key was found:\nyour-key-name\n\nWould you like to use this one instead? (y/N):\n```\n\nIf multiple keys match, it will ask you to make a decision:\n```bash\nauthkeyman remove key\n```\n```\nNo keys found commented with 'key', but these similar keys were found:\n[0]: key1\n[1]: key2\n\nWhich one would you like to use instead? (Default 0, make a selection 0-1): \n```\n\nRunning this command with `-y` will skip the prompt and remove the key.\nIf multiple keys match, it will delete the first key that matches.\n\n\n### List Keys\nLists all key comments in the `authorized_keys` file:\n```bash\nauthkeyman list\n```\n```\nKeys in /home/user/.ssh/authorized_keys:\nkey1\nkey2\n```\n\n\n### Perform Actions on Other Users\nYou can run all of these commands on other users\nwhen running `authkeyman` as `root` and specifying the `--user` flag:\n```bash\nsudo authkeyman --user user1 add \"ssh-ed25519 ... user1s-key\"\n```\n\nYou can add additional `--user` flags to specify multiple users:\n```bash\nsudo authkeyman --user user1 --user user2 add \"ssh-ed25519 ... users-key\"\n```\nNote that the `--user` flags must come directly after `authkeyman`\nand cannot come after a subcommand.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Quickly manage your authorized public SSH keys",
    "version": "1.1.0.post1",
    "project_urls": {
        "Homepage": "https://github.com/TacticalLaptopBag/authkeyman",
        "Issues": "https://github.com/TacticalLaptopBag/authkeyman/issues",
        "Repository": "https://github.com/TacticalLaptopBag/authkeyman"
    },
    "split_keywords": [
        "authorized_keys",
        " ssh",
        " cli",
        " command-line",
        " command",
        " line",
        " tool"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5afa7b18d6c1967aac31ea1bbf0ed4346ad3a23d49cc122e9fd5f25811a3303",
                "md5": "f029e17b17193a5c311138f25ceaa7ab",
                "sha256": "52ff21e5073cf2b216cd872b849e7e0a7b79425c517b1376fc3a091e24e03893"
            },
            "downloads": -1,
            "filename": "authkeyman-1.1.0.post1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f029e17b17193a5c311138f25ceaa7ab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 18192,
            "upload_time": "2025-07-26T13:52:08",
            "upload_time_iso_8601": "2025-07-26T13:52:08.906308Z",
            "url": "https://files.pythonhosted.org/packages/d5/af/a7b18d6c1967aac31ea1bbf0ed4346ad3a23d49cc122e9fd5f25811a3303/authkeyman-1.1.0.post1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f570dbe53628551eab56979c42c3d7bd03ea7a37e5941397e31bdd18f26bdfd2",
                "md5": "bccfb83a891a28d1da87ea81f859cfd2",
                "sha256": "71973e5d12a5c317c2bef379877b0ee210134f1e79e1f3bea480613f3222d0dc"
            },
            "downloads": -1,
            "filename": "authkeyman-1.1.0.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "bccfb83a891a28d1da87ea81f859cfd2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 16401,
            "upload_time": "2025-07-26T13:52:10",
            "upload_time_iso_8601": "2025-07-26T13:52:10.171979Z",
            "url": "https://files.pythonhosted.org/packages/f5/70/dbe53628551eab56979c42c3d7bd03ea7a37e5941397e31bdd18f26bdfd2/authkeyman-1.1.0.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-26 13:52:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TacticalLaptopBag",
    "github_project": "authkeyman",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "authkeyman"
}
        
Elapsed time: 1.82730s