Date: Fri, 28 Feb 2014 13:38:45 -0600 From: dweimer <dweimer@dweimer.net> To: FreeBSD Stable <freebsd-stable@freebsd.org> Cc: owner-freebsd-stable@freebsd.org Subject: Re: ssh-copy-id Message-ID: <83a5db073feded942392e673e50c77b2@dweimer.net> In-Reply-To: <2cba8fd9cc51dedc1bd5e127046f4ab7@dweimer.net> References: <2cba8fd9cc51dedc1bd5e127046f4ab7@dweimer.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02/28/2014 1:34 pm, dweimer wrote: > Has anyone had any luck getting the ssh-copy-id script that is > included with FreeBSD 10 working? > > When using it with the -i option to pass the identity key, I get a > printf error message. > > ssh-copy-id -i /home/dweimer/.ssh/id_rsa dweimer@webmail.dweimer.net > Password for dweimer@webmail.dweimer.local: > printf: Illegal option -- > > > Both of these systems are FreeBSD 10 systems, I took a look at > /usr/src/usr.bin/ssh-copy-id/ssh-copy-id.sh, and am wondering if the > -- in the mkdir line below is the culprit, or if maybe something else > isn't escaped properly. Well it wasn't that --, I removed it on my system, same result. > sendkey() { > local h="$1" > local k="$2" > printf "%s\n" "$k" | ssh $port -S none $options "$user$h" > /bin/sh -c \'' \ > set -e; \ > umask 077; \ > keyfile=$HOME/.ssh/authorized_keys ; \ > mkdir -p -- "$HOME/.ssh/" ; \ > while read alg key comment ; do \ > [ -n "$key" ] || continue; \ > if ! grep -sqwF "$key" "$keyfile"; then \ > printf "$alg $key $comment\n" >> > "$keyfile" ; \ > fi ; \ > done \ > '\' > } -- Thanks, Dean E. Weimer http://www.dweimer.net/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?83a5db073feded942392e673e50c77b2>