Corinna Vinschen
2016-Mar-12 19:42 UTC
Problem with ssh-copy-id when home folder contains spaces
Hi, some guy on the Cygwin mailing list found that ssh-copy-id chokes on directories with spaces, which are quite common on Windows. He also provided an easy fix, basically just adding quotes, which I attached to this mail. Would that be ok to apply upstream? Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat -------------- next part -------------- diff --git a/usr/bin/ssh-copy-id.old b/usr/bin/ssh-copy-id index afde8b1..bef5c95 100755 --- a/usr/bin/ssh-copy-id.old +++ b/usr/bin/ssh-copy-id @@ -233,17 +233,17 @@ populate_new_ids() { -o ControlPath=none \ -o LogLevel=INFO \ -o PreferredAuthentications=publickey \ - -o IdentitiesOnly=yes "$@" exit 2>$L_TMP_ID_FILE.stderr </dev/null + -o IdentitiesOnly=yes "$@" exit 2>"$L_TMP_ID_FILE.stderr" </dev/null if [ "$?" = "$L_SUCCESS" ] ; then - : > $L_TMP_ID_FILE + : > "$L_TMP_ID_FILE" else - grep 'Permission denied' $L_TMP_ID_FILE.stderr >/dev/null || { - sed -e 's/^/ERROR: /' <$L_TMP_ID_FILE.stderr >$L_TMP_ID_FILE + grep 'Permission denied' "$L_TMP_ID_FILE.stderr" >/dev/null || { + sed -e 's/^/ERROR: /' <"$L_TMP_ID_FILE.stderr" >"$L_TMP_ID_FILE" cat >/dev/null #consume the other keys, causing loop to end } fi - cat $L_TMP_ID_FILE + cat "$L_TMP_ID_FILE" done } ) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160312/d866d28c/attachment-0001.bin>
Philip Hands
2016-Mar-13 11:09 UTC
Problem with ssh-copy-id when home folder contains spaces
Corinna Vinschen <vinschen at redhat.com> writes:> Hi, > > some guy on the Cygwin mailing list found that ssh-copy-id chokes > on directories with spaces, which are quite common on Windows. > > He also provided an easy fix, basically just adding quotes, which I > attached to this mail. Would that be ok to apply upstream?Done: http://git.hands.com/ssh-copy-id I've reported it as a (fixed) bug, and marked it as blocking V_7_3, so it ought to make the next release: https://bugzilla.mindrot.org/show_bug.cgi?id=2551 Thanks for reporting it. Cheers, Phil. -- |)| Philip Hands [+44 (0)20 8530 9560] HANDS.COM Ltd. |-| http://www.hands.com/ http://ftp.uk.debian.org/ |(| Hugo-Klemm-Strasse 34, 21075 Hamburg, GERMANY -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160313/63b33d1b/attachment.bin>
Corinna Vinschen
2016-Mar-13 11:38 UTC
Problem with ssh-copy-id when home folder contains spaces
On Mar 13 12:09, Philip Hands wrote:> Corinna Vinschen <vinschen at redhat.com> writes: > > > Hi, > > > > some guy on the Cygwin mailing list found that ssh-copy-id chokes > > on directories with spaces, which are quite common on Windows. > > > > He also provided an easy fix, basically just adding quotes, which I > > attached to this mail. Would that be ok to apply upstream? > > Done: > > http://git.hands.com/ssh-copy-id > > I've reported it as a (fixed) bug, and marked it as blocking V_7_3, so > it ought to make the next release: > > https://bugzilla.mindrot.org/show_bug.cgi?id=2551 > > Thanks for reporting it.Thanks for applying. Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160313/63518215/attachment.bin>
Darren Tucker
2016-Mar-13 22:29 UTC
Problem with ssh-copy-id when home folder contains spaces
On Sun, Mar 13, 2016 at 10:09 PM, Philip Hands <phil at hands.com> wrote: [...]> http://git.hands.com/ssh-copy-idAlso applied to the main tree.> I've reported it as a (fixed) bug,Please don't mark a bug fixed until it's applied to the main tree. We're unlikely to look closely at marked-fixed bugs so if we miss the email thread we might miss the bug. Thanks all. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Apparently Analagous Threads
- [Bug 2105] New: ssh-copy-id leads to rm -f * (local vs. dash)
- [Bug 2575] New: ssh-copy-id fails when it can not find any key file in ~/.ssh
- Fwd: How to avoid friends of friends joining the vpn ?
- [PATCH] Cygwin: Change service name to cygsshd
- [PATCH] Cygwin: Change service name to cygsshd