| Summary: | ssh-copy-id to Solaris 10 or older | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Carlos Rodríguez-Gili <carlos.rodriguez-gili> |
| Component: | ssh-copy-id | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED MOVED | ||
| Severity: | enhancement | CC: | djm, jjelen |
| Priority: | P5 | ||
| Version: | 8.5p1 | ||
| Hardware: | Other | ||
| OS: | Windows 10 | ||
Please, fill this as a MR to https://gitlab.com/phil_hands/ssh-copy-id DONE closing bugs resolved before openssh-8.9 |
Solaris 10 and older Solaris' /bin/sh is not POSIX. Using ssh-copy-id fails with the following error: sh: test: argument expected The problem can be solved using double quotes for test -z in the INSTALLKEYS_SH heredoc: - { [ -z \`tail -1c ${AUTH_KEY_FILE} 2>/dev/null\` ] || + { [ -z "\`tail -1c ${AUTH_KEY_FILE} 2>/dev/null\`" ] || The resulting script seems to work for non-existing, empty, and populated ~/.ssh/authorized_keys files. I don't see the double quotes breaking POSIX (although unnecessary). I don't think this is a big issue, just thought you might like to know. BTW it also happens with older versions (before installkeys_sh()).