SSH version of linux/unix servers

Hi All,

Has anyone created property, relevance to determine SSH version of Linux/Unix server?

Wouldn’t this be a simple version of the rpm “ssh” ?

I need relevance answer somehow like this.
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013

I found somewhere we can use below command to get this answer, can you help me to create it’s property?
ssh -V

I don’t have a linux box with me. You can’t run a command from relevance so that won’t be directly possible

Try looking at the relevance https://developer.bigfix.com/relevance/reference/rpm-package-version-record.html

You can also use an action to run the command ‘ssh -V’ maybe once a day and output it to a file. Then create a property to read the contents of the file.

So the following can get you close

Q: packages whose (it as string contains "ssh") of rpms
A: openssh-5.3p1-20.el6
A: openssh-askpass-5.3p1-20.el6
A: libssh2-1.4.2-1.el6
A: openssh-server-5.3p1-20.el6
A: openssh-clients-5.3.p1-20.el6

See this analysis to get the raw data from rpm & debianpackages: https://bigfix.me/analysis/details/2998050

Try this:

(it as string) of versions of packages whose("ssh" = name of it AND (if exists properties whose(it as string contains "currently installed of ") then (currently installed of it) else TRUE)) of (if exists properties whose(it as string contains "debianpackage:") then debianpackages else if exists properties whose(it as string contains "rpm:") then rpms else ERROR "The operators are not defined.")

This works both for the RedHat family as well as the Debian family of linux distros, which covers the most common ones, including Oracle Enterprise Linux.

The relevance could be adapted to give the version info for SSH. You could also use it to give more than just the version info of ssh.


Related:

I also wanted to add that it should be possible to get the info you are looking for by reading a file directly with relevance in addition to other options.

Thank you so much for your support.
I tried @AlanM’s relevance and got the desired output.

Thanks everyone. :slight_smile: