Created
January 10, 2019 10:50
-
-
Save milovtim/7c628978f22cc6614dbaa56c0ed6c351 to your computer and use it in GitHub Desktop.
A commands under ssh-copy-id helper script
This file contains 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
printf '%s\n' "$NEW_IDS" | ssh "$@" " | |
umask 077 ; | |
mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ; | |
if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment