Last active
December 6, 2020 19:06
-
-
Save mayvazyan/f2df55f922dc909e1217e22cc14aec77 to your computer and use it in GitHub Desktop.
./enable_ssh.sh example.com
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
# Allows to quickly enable access using rsa public key | |
# Example usage: | |
# ./enable_ssh example.com | |
cat ~/.ssh/id_rsa.pub | ssh $1 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment