Skip to content

Instantly share code, notes, and snippets.

@headStyleColorRed
Created October 30, 2020 17:55
Show Gist options
  • Save headStyleColorRed/ec0a9edb544324d02ee42560e9a69457 to your computer and use it in GitHub Desktop.
Save headStyleColorRed/ec0a9edb544324d02ee42560e9a69457 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# This command shoud be run with "bash whatever.sh" instead of "sh whatever.sh"
# First generate key and make folder
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< y"" ;
# Create authorized_keys
touch ~/.ssh/authorized_keys
# Copy public key in authorized key
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment