Bug#390344: ssh-copy-id: Should specify that the remote command must be ran with /bin/sh
found 390344 1:5.1p1-5
thanks
There's another way to run the command without making assumptions about
the remote shell: use mkdir -p
Xr
--- ssh-copy-id.orig 2009-05-18 13:43:58.000000000 +0200
+++ ssh-copy-id 2009-05-18 13:44:21.000000000 +0200
@@ -38,7 +38,7 @@
exit 1
fi
-{ eval "$GET_ID" ; } | ssh ${1%:} "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
+{ eval "$GET_ID" ; } | ssh ${1%:} "umask 077; mkdir -p .ssh ; cat >> .ssh/authorized_keys" || exit 1
cat <<EOF
Now try logging into the machine, with "ssh '${1%:}'", and check in:
Reply to: