https://bugzilla.mindrot.org/show_bug.cgi?id=2903
Bug ID: 2903
Summary: ssh-keyscan returns '0' when no keys are found
Product: Portable OpenSSH
Version: 7.6p1
Hardware: amd64
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: ssh-keyscan
Assignee: [email protected]
Reporter: [email protected]
ssh-keyscan returns with an exit status of '0' when DNS resolution of a
domain fails or an SSH connection can't be made. In instances where
scripting is involved, this leads to situations where there is no
indication that the command completed successfully. Authors are then
forced to capture and parse the output in order to test for a
successful run.
DNS Resolution:
> ssh-keyscan shouldnotresolve.example
> echo $?
0
No SSH Service:
> ssh-keyscan example.com
> echo $?
0
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs