Skip to content

Instantly share code, notes, and snippets.

@milovtim
Created January 10, 2019 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milovtim/7c628978f22cc6614dbaa56c0ed6c351 to your computer and use it in GitHub Desktop.
Save milovtim/7c628978f22cc6614dbaa56c0ed6c351 to your computer and use it in GitHub Desktop.
A commands under ssh-copy-id helper script
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