% KEY-MANAGEMENT(1) Version 3.0.4 | Scripts Documentation % Georg Voell - georg.voell@oracle.com % (c)2020 Oracle NAME ==== **key-management** - (BASH Script) Manage the ssh keys. SYNOPSIS ======== | **key-management** \[_options_] _action_ \[_action-parameter_] DESCRIPTION =========== Manage the ssh keys. Options ------- -h, \--help          : Displays helptext. -v, \--version          : Displays the version of the script. -u, \--username _string_          : Name of user e.g. "name@org.com". -p, \--passphrase _string_         : Passphrase for key encryption. Action ------- list          : List all local user with keys. delete          : Delete all the keys for user specified by username. install          : Install 'get-authkeys' software. Need to be root to proceed. create [local]          : Create private and public keypair for ssh and putty. If optional paramter "local" is given, don't use internet API. change _newpass_         : Change old passphrase specified by option to new passphrase "newpass". show _format_          : Display keys or fingerprint. Allowed values: "pub", "ssh", "api", "pk8", "ppk", 'fp' or vaultsecret ocid. check _keyfile_          : Display type of key. import _keyfile_         : Import a private key (and create all ather key formats) from file. push _hostname_          : Copy keys to destination ("hostname" specified in ".ssh/config" with parameter "Host" e.g. "Linux7"). Format ------- pub | public          : Display ssh public key (username required). ssh | rsa | priv          : Display ssh private key (username required). api | pem          : Display public key in PEM format (OCI API key - username required). pk8 | pkcs8          : Display private key in PEM format (PKCS#8 - username required). ppk | putty          : Display putty private key (PPK - username required). fp | fingerprint          : Display fingerprint of private key (username required). _ocid_          : Display vaultsecret. Specify a vaultsecret ocid e.g. ocid1.vaultsecret.oc1._region_._unique-id_ EXAMPLES ======== **key-management** create \--username "opc" : Create keys for user "opc" **key-management** list : Show all user (which have keys created with this tool) **key-management** show api \--username "opc" : Display OCI API public key in PEM format. **key-management** show ssh \--username "opc" : Display ssh private key. **key-management** show fp \--username "opc" : Display fingerprint for ssh private key (needed by OCI). EXIT CODES ========== 01: Unknown or wrong parameter. 02: No username specified. 03: Error while creating / changing /deleting keys. 04: Key (or user) does not exist. 05: No second parameter given. 06: Could not copy keys to destination. 07: Could not read keyfile. 08: Could not import keyfile. 09: Passphrase needed. 10: Could not install 'get-authkeys'. 99: User interrupt. SEE ALSO ======== **install-scripts**(1)