-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
rhel-9.2.0
-
None
-
Yes
-
Low
-
rhel-security-crypto-diamonds
-
None
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
x86_64
-
None
What were you trying to do that didn't work?
a testcase was trying to copy a file to itself, but on newer versions of openssh, the file is deleted instead.
What is the impact of this issue to you?
scp unexpectedly deletes a file
Please provide the package NVR for which the bug is seen:
How reproducible is this bug?:
Steps to reproduce
- cat /tmp/a
test_text - scp host1:/tmp/a host1:/tmp/a
a 0% 0 0.0KB/s -:- ETA
2025-08-19-08.51.11 -0700 | Aug 19 08:51:11
# ls -lart /tmp/a
rw-rr- 1 root root 0 Aug 19 08:51 /tmp/a - cat /tmp/a
- rpm -qa | grep openssh
openssh-8.7p1-45.el9.x86_64
openssh-clients-8.7p1-45.el9.x86_64
openssh-server-8.7p1-45.el9.x86_64Expected results
Not to delete the file contents. This looks to be a regression with the move to sftp since this does not occur when you use the `-O` parameter.
Note, this is not a practical thing to do, but it broke some automation we had so probably better to fix it.