Bug#390344: ssh-copy-id: Should specify that the remote command must be ran with /bin/sh
Package: openssh-client
Version: 1:6.0p1-4
Followup-For: Bug #390344
With the recent addition of the restorecon commands, ssh-copy-id also fails on tcsh, due
to the sh/bashisms in the command line.
The above patch works for me, though I've updated it to include the latest changes:
{ eval "$GET_ID" ; } | ssh $host "sh -c 'umask 077; mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys && (test -x /sbin/restorecon && /sbin/restorecon ~/.ssh ~/.ssh/authorized_keys >/dev/null 2>&1 || true)'" || exit 1
-- System Information:
Debian Release: 7.0
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages openssh-client depends on:
ii adduser 3.113+nmu3
ii debconf [debconf-2.0] 1.5.49
ii dpkg 1.16.10
ii libc6 2.13-38
ii libedit2 2.11-20080614-5
ii libgssapi-krb5-2 1.10.1+dfsg-5
ii libselinux1 2.1.9-5
ii libssl1.0.0 1.0.1e-2
ii passwd 1:4.1.5.1-1
ii zlib1g 1:1.2.7.dfsg-13
Versions of packages openssh-client recommends:
ii openssh-blacklist 0.4.1+nmu1
ii openssh-blacklist-extra 0.4.1+nmu1
ii xauth 1:1.0.7-1
Versions of packages openssh-client suggests:
pn keychain <none>
pn libpam-ssh <none>
pn monkeysphere <none>
pn ssh-askpass <none>
-- Configuration Files:
/etc/ssh/ssh_config changed [not included]
-- no debconf information
Reply to: