Bug 2771 - scp has an exit status of 0 when the username is invalid
Summary: scp has an exit status of 0 when the username is invalid
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: 7.5p1
Hardware: All All
: P5 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-29 17:08 AEST by Ofer
Modified: 2018-10-19 17:17 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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