[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#390344: ssh-copy-id: Should specify that the remote command must be ran with /bin/sh



found 390344 1:4.7p1-8
tag 390344 patch
thanks

I second this. fish is still exotic but gaining popularity (at least as far as I know). The patch is simple and since ssh-copy-id already relies on /bin/sh for local execution, it could as well rely on it for remote execution.

Cheers,
Xr
--- ssh-copy-id.orig	2008-05-14 14:07:17.000000000 +0200
+++ ssh-copy-id	2008-05-14 13:54:22.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 "sh -c 'umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys'" || exit 1
 
 cat <<EOF
 Now try logging into the machine, with "ssh '$1'", and check in:

Reply to: