diff --git a/ssh/ssh.go b/ssh/ssh.go index e31f3d8..3e327fb 100644 --- a/ssh/ssh.go +++ b/ssh/ssh.go @@ -25,7 +25,12 @@ func (m *SSHMatcher) Vendor(matchCtx *osm.MatchCtx) string { } func (m *SSHMatcher) Version(matchCtx *osm.MatchCtx) string { - return "UNKNOWN" + v := "UNKNOWN" + if _v, ok := matchCtx.GetAttribute("softwareversion"); ok { + v = _v + } + + return v } func (m *SSHMatcher) OsType(matchCtx *osm.MatchCtx) string { @@ -38,9 +43,6 @@ func (m *SSHMatcher) OsVersion(matchCtx *osm.MatchCtx) string { func (m *SSHMatcher) Name(matchCtx *osm.MatchCtx) string { name := "SSH" - if v, ok := matchCtx.GetAttribute("softwareversion"); ok { - name = name + " (" + v + ")" - } return name }