[Bug 2903] New: ssh-keyscan returns '0' when no keys are found

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Sun Sep 9 15:44:28 AEST 2018


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: unassigned-bugs at mindrot.org
          Reporter: robert at grizzell.me

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.


More information about the openssh-bugs mailing list