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
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 } )
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev