Description of problem: scp -3r a:foo user@b: foo didn't exist, but scp gave no error message. (a and b are rhel7 boxen, also seems to happen if a is rhel5, so I think it's actually the client end, which is my f21 laptop) Version-Release number of selected component (if applicable): openssh-clients-6.6.1p1-5.fc21.1.x86_64 (my laptop) openssh-server-6.4p1-8.el7.x86_64 (RHEL7 host a and b) How reproducible: 100% Steps to Reproduce: 1. scp -3r a:foo b: where foo doesn't exist Actual results: Apparent success Expected results: An error, since foo didn't exist on the source Additional info: adding -v shows: Sink: scp: foo: No such file or directory
I tried this use case also with upstream release and it behaves the same. In man page of scp, there is note: > Note that this option disables the progress meter. And I would say that this issue is related to this note, because the file transfer is made through the local host and the inputs and outputs of both remote commands are connected (but it doesn't change the thing that stderr should output). All the behaviour of -3 option is quite strange, since the errors from source system are written only with -v option and errors from target system are never written. I can try to place the question into openssh bugzilla, but upstream is not much willing to maintain scp. For more information, this feature is related to this bugzilla [1], but without much discussion. [1] https://bugzilla.mindrot.org/show_bug.cgi?id=1837
I'm able to make scp -3 command working in the way like this with one simple patch, but I would like to make it more clear, so please wait some more days: [root@f21 build]# ./scp localhost:nothing localhost: nothing: No such file or directory Killed by signal 1. Connection to localhost closed. [root@f21 build]# ./scp localhost:scp localhost:/path/do/not/exists/ scp: No such file or directory Killed by signal 1. Connection to localhost closed. Just to provide more information for people more interested, scp with -3 creates pipe between two childs, they are sending errors to each other and because they are both remote, none of them writes this message out. Patch looks for now like this: diff --git a/scp.c b/scp.c index e4e9fa1..8da7d91 100644 --- a/scp.c +++ b/scp.c @@ -1228,7 +1228,7 @@ response(void) *cp++ = ch; } while (cp < &rbuf[sizeof(rbuf) - 1] && ch != '\n'); - if (!iamremote) +// if (!iamremote) (void) atomicio(vwrite, STDERR_FILENO, rbuf, cp - rbuf); ++errs; if (resp == 1)
This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still present in openssh-clients-7.1p1-5.fc23.x86_64
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still in f25, openssh-7.3p1-6.fc25.x86_64
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.