-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix EOF: command not found
error in ssh-copy-id
#206
Conversation
Hi, Regards. |
ssh-copy-id is contributed by Phil Hands, its upstream is at https://gitlab.com/phil_hands/ssh-copy-id/-/tree/main |
Which shell/OS was it that threw this error? I'm asking becuase it occurs to me that it may be better to detect that shell in a way similar to the initial 'if false " ...' test for the old Solaris shell, and then hunt for something better. However, I suspect that the suggested patch is pretty portable, so probably easier to go with that. BTW /bin/sh is not always a symlink to /bin/bash on Linux -- that is dependant on the distribution. Debian uses dash as the default /bin/sh, for instance. |
Aside:
if your /dev/null is not world writable (or isn't a character special file) then many things are going to be sad. |
I don't think the |
Fedora 33 (Workstation Edition Prerelease). |
Maybe more important what shell is your default and what is your |
|
Oh, right, I see it also with default |
I don't understand how this has to do with bash vs. sh. This is an obvious shell error and I want to see any shell which interprets this correct. To reduce the problem, execute the following command:
It is wrong to close the subshell before the EOF end marker |
Ok, I tried it with dash and there it works. bash accepts
but not
dash accepts both. |
Ah, righto -- It seems that I've somehow managed to do all of my testing with dash. That was careless. I'll add a few more shells to my tests, and then fix this as suggested. Thanks for the report :-) |
This is now included in my repo: https://gitlab.com/phil_hands/ssh-copy-id/-/tree/main so the pull request here is no longer needed. Thanks again to you all for helping make ssh-copy-id better. |
I have pulled this change (and a couple of subsequent ones) from Phil's repository. Thanks all. |
After update of git-for-windows to 2.29.1 a newer version of openssh 8.4p1 was included as well. This version contains a bug in the ssh-copy-id script (see: openssh/openssh-portable#206). This commit fixes git-for-windows/git#2873 Signed-off-by: Marcel Hoyer <[email protected]>
It's perfect!
I fixed the problem in Cygwin with openssh 8.4p1-1 package. Thank you! |
Based on Debian patch. Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=d9e727dcc04a52caaac87543ea1d230e9e6b5604 Bug: openssh#206 Bug-Debian: https://bugs.debian.org/975540 Bug-Debian: https://bugs.debian.org/976242
At the moment, the ssh-copy-id utility is not working properly.
OpenSSH 8.4/8.4p1 (2020-09-27).