diff options
author | Oleg <Fallmay@users.noreply.github.com> | 2020-10-01 12:09:08 +0300 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-10-03 09:20:55 +1000 |
commit | d9e727dcc04a52caaac87543ea1d230e9e6b5604 (patch) | |
tree | d86de6f09e8cd324df64a07f4f74a04781f6f832 /contrib | |
parent | a1a856d50c89be3206f320baa4bfb32fff4e826f (diff) | |
download | openssh-git-d9e727dcc04a52caaac87543ea1d230e9e6b5604.tar.gz |
Fix `EOF: command not found` error in ssh-copy-id
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ssh-copy-id | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index 392f64f9..a7690771 100644 --- a/contrib/ssh-copy-id +++ b/contrib/ssh-copy-id @@ -247,7 +247,7 @@ installkeys_sh() { # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing # the cat adds the keys we're getting via STDIN # and if available restorecon is used to restore the SELinux context - INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF) + INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF cd; umask 077; mkdir -p $(dirname "${AUTH_KEY_FILE}") && @@ -258,6 +258,7 @@ installkeys_sh() { restorecon -F .ssh ${AUTH_KEY_FILE}; fi EOF + ) # to defend against quirky remote shells: use 'exec sh -c' to get POSIX; printf "exec sh -c '%s'" "${INSTALLKEYS_SH}" |