Last active
October 19, 2017 15:06
-
-
Save tonejito/9ae6fc6265a94c41d8bfa1e6e89b3e98 to your computer and use it in GitHub Desktop.
Generate and print SSH key
This file contains hidden or 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
#!/usr/bin/env bash | |
# = ^ . ^ = | |
# https://gist.github.com/tonejito/9ae6fc6265a94c41d8bfa1e6e89b3e98 | |
KEY=id_rsa | |
MAIL=${USER}@$(hostname -f) | |
umask 0077 | |
mkdir -vp ~/.ssh/keys/ | |
ssh-keygen -N "" -t rsa -b 8192 -f ~/.ssh/keys/${KEY} -C ${MAIL} | |
ssh-keygen -l -f ~/.ssh/keys/${KEY} | |
ssh-keygen -l -f ~/.ssh/keys/${KEY}.pub | |
cat ~/.ssh/keys/${KEY}.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment