generate-and-send-ssh-key
generate-and-send-ssh-key copied to clipboard
ssh keygen only generates for local user and local host not passed in user and host
The current ssh keygen command only generates for local user and local host not the passed in user and host. It would be good if it would generate a key based on the passed in user and host. I create different users for systems I manage and it would be good if the script would handle generating for any passed in user and host.
Current: ${SSH_KEYGEN} -t $KEYTYPE -b $KEYSIZE -f "${FILENAME}" -N "${PASSPHRASE}"
Proposed addition: ${SSH_KEYGEN} -t $KEYTYPE -b $KEYSIZE -f "${FILENAME}" -N "${PASSPHRASE}" -C "${USER}@${HOST}"
I made the manual change in my local script and it works great! Just might want to add some check to see which way user wants it.