I use releng/10.1 at r272885. When I try to copy my private key with 'ssh-copy-id ~/.ssh/id_rsa.pub root@IP', I get: Unmatched '. Unmatched '. Using ssh-copy-id in /usr/src/crypto/openssh/contrib/ seems to work.
I obviously meant public key, not the private one :)
This also does not work in 10.1-RELEASE. Both me and other user on irc just noticed it is broken.
- Assign to eadler
I added a (previously missing?) line continuation - seems to work correctly: --- usr.bin/ssh-copy-id/ssh-copy-id.sh.orig +++ usr.bin/ssh-copy-id/ssh-copy-id.sh @@ -48,7 +48,7 @@ done ; \ if [ -x /sbin/restorecon ]; then \ /sbin/restorecon -F "$HOME/.ssh/" "$keyfile" >/dev/null 2>&1 || true ; \ - fi + fi \ '\' }
I've never used ssh-copy-id on freebsd before, but I was just doing some tests with ansible and this was suggested at some point and I noticed the reported issue still exists (on 10.1 and 11-CURRENT) the fix seems to be the missing "/" as suggested by Ross Kilgariff.
Updated 10.1-BETA and 10.1-RC versioned bugs to 10.1-STABLE.
FYI this bug is still present, and the proposed patch works. running: FreeBSD r2d2 11.0-CURRENT FreeBSD 11.0-CURRENT #11 r282430+eacabb4(master)
A commit references this bug: Author: eadler Date: Sat May 16 06:15:49 UTC 2015 New revision: 283001 URL: https://svnweb.freebsd.org/changeset/base/283001 Log: ssh-copy-id: Add missing line continuation PR: 194301 Reported by: pkubaj@riseup.net Patch by: Ross Kilgariff <rosskilgariff@gmail.com> Changes: head/usr.bin/ssh-copy-id/ssh-copy-id.sh
I just committed the fix. Sorry about the delay.
A commit references this bug: Author: eadler Date: Wed Jun 10 01:17:15 UTC 2015 New revision: 284197 URL: https://svnweb.freebsd.org/changeset/base/284197 Log: MFC r283001: ssh-copy-id: Add missing line continuation PR: 194301 Requested by: tuexen Changes: _U stable/10/ stable/10/usr.bin/ssh-copy-id/ssh-copy-id.sh
MFC complete.