Bug 2771

Summary: scp has an exit status of 0 when the username is invalid
Product: Portable OpenSSH Reporter: Ofer <ofer456123>
Component: scpAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: djm
Priority: P5    
Version: 7.5p1   
Hardware: All   
OS: All   

Description Ofer 2017-08-29 17:08:40 AEST
The scp program has an exit status of 0 when the username is invalid.
I get the following on both Linux and Cygwin (note the invalid space in the username):

>scp file.txt "invalid user@host.com:file.txt"
invalid user: invalid user name
>echo $?
0
Comment 1 Damien Miller 2018-04-06 14:40:51 AEST
This was fixed in OpenSSH 7.7
Comment 2 Damien Miller 2018-10-19 17:17:25 AEDT
Close RESOLVED bugs with the release of openssh-8.0