Skip to content

Keys Script Design

Oliver Scotten edited this page Jan 26, 2024 · 1 revision

The basic design of the scripts is super simple and should follow these rules below.

Script Flags

There is one optional flag '-u' that is the username. If the flag is not supplied the script will prompt for the username.

There should also be a simple help or '-h' flag that show a help page.

Output Codes

The script should exit code 0 when run successfully. Otherwise, exit code 1.

Main Function

The script should try and create the ~/.ssh/ directory if it does not already exist. After getting the SSH public keys from GitHub, they should APPEND the new keys to the authorized_keys file if it already exists, otherwise create the new file with the downloaded keys.

EOF

Thats it, should be super simple and run without any dependencies that need to be installed.

For example, I should be able to fresh install and be able to run the script without having to use pip to install dependencies.

Clone this wiki locally