Created
January 18, 2023 12:11
-
-
Save jsynowiec/c35d86b823e51a64c7c789c240d7d59e to your computer and use it in GitHub Desktop.
The following command will create a new SSH key using ED25519 with an auto-generated comment and unique file name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the service variable to uniquely identify a service or area the key is intended for. | |
service="github" \ | |
now=$(date +'%Y%m%d') \ | |
name="$(whoami)@$(hostname -s | tr +'[:upper:]' +'[:lower:]')" \ | |
sh -c 'ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519_$name_$service -C "$name-$service-$now"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment