Last active
October 28, 2018 21:00
-
-
Save sethbergman/677c556d77f250d82b47bd09cd342df6 to your computer and use it in GitHub Desktop.
Add SSH Keys
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
# linux script to add a new ssh key to a bunch of different domains to which you have ssh access | |
# key_to_add.txt is a text file containing the ssh key and should be in the same directory | |
# add valid credentials for however many domains you need to add ssh keys for | |
# domain1 to add key to | |
cat key1.txt | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' | |
# domain2 to add key to | |
cat key2.txt | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' | |
# domain3 to add key to | |
cat key3.txt | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' |
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
# Replace this line with SSH key to add |
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
# Replace this line with SSH key to add |
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
# Replace this line with SSH key to add |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment