Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This is a work in progress, you might not like what it does...
- read -p "Enter email for SSH comment : " email_to_use
- email_to_use=${email_to_use:-}
- read -p "Enter name for ssh key : " ssh_key_filename
- ssh_key_filename=${ssh_key_filename:-rsa_two}
- ssh-keygen -q -t rsa -b 4096 -C "$email_to_use" -f ~/.ssh/$ssh_key_filename -P ""
- config_file_key=IdentityFile
- new_config_file_value="~\/.ssh\/$ssh_key_filename/"
- sed -i "s/\(^ $config_file_key\).*/\1 $new_config_file_value" ~/.ssh/config
- echo ""
- cat ~/.ssh/$ssh_key_filename.pub
- echo ""
- echo "Copy the above text to GitHub as your public key. This VM will then be able to access your repositories."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement