diff options
author | Colin Watson <cjwatson@debian.org> | 2020-12-02 10:30:09 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-12-02 10:30:09 +0000 |
commit | c5a2f2861869c72530dc1a937e3add42957d2d11 (patch) | |
tree | 978146859edda762a1eec05f2812e7f795d939bb /contrib/ssh-copy-id | |
parent | 6c4fd5458b0debff89651106911834a7f08278dd (diff) | |
parent | 27cf2f667b46a99f4469f41bcb8e004834a3d34f (diff) |
Fix `EOF: command not found` error in ssh-copy-id
Closes: #975540
Diffstat (limited to 'contrib/ssh-copy-id')
-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 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 |
260 | EOF | 260 | EOF |
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}" |