hygienic-books 310b1d1eab feat(role): Add SSH key pair and derivatives generation function
function ssh_keysuite_gen generates an OpenSSH-formatted SSH
public-private key pair. This is the OpenSSH default key format, its
plain text file header string reads:

    -----
    BEGIN OPENSSH PRIVATE KEY
    -----

Depending on key type it then generates all possible additional
formats for both public and private key. For all key types
currently recommended by ssh-keygen (ed25519, rsa2, ecdsa) the
function generates an RFC4716-formatted public key. This plain text
file has header string:

    -----
    BEGIN SSH2 PUBLIC KEY
    -----

Also for all key types currently recommended by ssh-keygen the
function then converts the private key into PuTTYgen format.

Afterwards rsa2 and ecdsa keys are further processed. These steps do
not apply to ed25519 keys as no such processing is possible. For an
rsa2 key the function converts its private key into a PEM-encoded
PKCS#1 key with plain text file header string:

    -----
    BEGIN RSA PRIVATE KEY
    -----

For an elliptic curve key (i.e. an ecdsa key) the function converts
it into a PEM-encoded Elliptic Curve key with the following plain
text file header string:

    -----
    BEGIN EC PRIVATE KEY
    -----

For both rsa2 and ecdsa keys the function then converts the private
key to PEM-encoded PKCS#8 format marked by either one of the
following two plain text file header strings:

    -----
    BEGIN PRIVATE KEY
    -----

or

    -----
    BEGIN ENCRYPTED PRIVATE KEY
    -----

Also for both rsa2 and ecdsa key the function converts the public key
into SubjectPublicKeyInfo (SPKI) format which looks like so:

    -----
    BEGIN PUBLIC KEY
    -----

This function serves as a shortcut to cover all bases for systems and
software that depend on SSH keys in specific formats.
2025-09-19 00:45:29 +02:00
2025-04-02 02:39:25 +02:00
2025-04-02 02:39:25 +02:00
2025-04-02 02:39:25 +02:00
2025-04-02 02:39:25 +02:00
2025-04-01 22:49:29 +00:00
2025-04-02 03:24:08 +02:00

Role Name

role-common-bash_convenience

Description

Does basic .bashrc setup for Linux machines.

Requirements

Your target machines must be Linux.

Role Variables

Per defaults/main.yml this role will operate on the target machine's local root account by default. Change list elements in local_accounts_that_need_bash_settings as needed. Better yet, override this with host vars.

Dependencies

None.

Example Playbook

In your playbook.yml call it like so:

- name: 'Awesome playbook'
  hosts: all
  roles:
    - 'role-common-bash_convenience'

License

MIT

Description
An Ansible role that does basic bashrc setup for Linux machines
Readme MIT 38 KiB
Languages
Jinja 100%