summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/ssh-copy-id3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index 392f64f94..a76907717 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -247,7 +247,7 @@ installkeys_sh() {
247 # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing 247 # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing
248 # the cat adds the keys we're getting via STDIN 248 # the cat adds the keys we're getting via STDIN
249 # and if available restorecon is used to restore the SELinux context 249 # and if available restorecon is used to restore the SELinux context
250 INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF) 250 INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF
251 cd; 251 cd;
252 umask 077; 252 umask 077;
253 mkdir -p $(dirname "${AUTH_KEY_FILE}") && 253 mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
@@ -258,6 +258,7 @@ installkeys_sh() {
258 restorecon -F .ssh ${AUTH_KEY_FILE}; 258 restorecon -F .ssh ${AUTH_KEY_FILE};
259 fi 259 fi
260EOF 260EOF
261 )
261 262
262 # to defend against quirky remote shells: use 'exec sh -c' to get POSIX; 263 # to defend against quirky remote shells: use 'exec sh -c' to get POSIX;
263 printf "exec sh -c '%s'" "${INSTALLKEYS_SH}" 264 printf "exec sh -c '%s'" "${INSTALLKEYS_SH}"