summaryrefslogtreecommitdiff
path: root/contrib/ssh-copy-id
diff options
context:
space:
mode:
authorOleg <Fallmay@users.noreply.github.com>2020-10-01 12:09:08 +0300
committerColin Watson <cjwatson@debian.org>2020-12-02 10:25:21 +0000
commit27cf2f667b46a99f4469f41bcb8e004834a3d34f (patch)
treea2efee172cb2e983678e4baa163b48fa95a4496b /contrib/ssh-copy-id
parent67434174b3d64b352a794275f77489ebf1575849 (diff)
Fix `EOF: command not found` error in ssh-copy-id
Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=d9e727dcc04a52caaac87543ea1d230e9e6b5604 Bug: https://github.com/openssh/openssh-portable/pull/206 Bug-Debian: https://bugs.debian.org/975540 Bug-Debian: https://bugs.debian.org/976242 Last-Update: 2020-12-02 Patch-Name: ssh-copy-id-heredoc-syntax.patch
Diffstat (limited to 'contrib/ssh-copy-id')
-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}"