Skip to content

Instantly share code, notes, and snippets.

@YakDriver
Last active February 22, 2018 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YakDriver/17a71c871b7284fe12b89a22426bd91d to your computer and use it in GitHub Desktop.
Save YakDriver/17a71c871b7284fe12b89a22426bd91d to your computer and use it in GitHub Desktop.
Generate keys
#!/bin/bash
org=$1
name=${2:-$USER}
echo "Usage: $0 [organization] [name]"
create_date=$(date +'%Y%m%d')
if [ -n "${org}" ] ; then org="$org " ; fi
# default is RSA, this generates a 4096 bit private key
ssh-keygen -b 4096 -C "$org$name RSA Key Generated on $create_date"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment