74i8Un3 74i8Un3 - 1 year ago 120
Bash Question

Get remote openssl software version without logging in

I would like to check the version of openssl without having to log in to each server and typing

openssl version

There's about 100 IP addresses I have. Can I get some direction on how this could be done with a bash script passing in a word-list with all IP addresses ?

I'm aware of configuration management tools ( Saltstack, Chef, etc.. ) but that brings me back to logging in and installing agents on each server. I rather not do at this time.

Answer Source

Edit: I didn't notice you were asking for openssl, not openssh.

If you put the remote host data in a file hosts like


you can use

cat hosts | xargs -I % sh -c 'printf "%: " ; ssh % openssl version'

And, as @jww commented, this would be rather a question for SuperUser

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download