cancel
Showing results for 
Search instead for 
Did you mean: 

Version Info

john guardian
Super Advisor

Version Info

As an example: If I needed to ascertain via a script the version of ssh and was looking for version information of the form

A.05.00.025

what's the best way to interrogate the system?

Thanks.

6 REPLIES
Duncan Edmonstone
Honored Contributor

Re: Version Info

ssh -V

or

swlist SecureShell

plus some text manipulation should do it...

or was it the text manipulation you wanted help with

HTH

Duncan

HTH

Duncan
James R. Ferguson
Acclaimed Contributor

Re: Version Info

Hi John:

Most open-source software (from which this comes) will report its version when passed a -V':

# ssh -V
OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5, OpenSSL 0.9.7m 23 Feb 2007
HP-UX Secure Shell-A.05.10.007, HP-UX Secure Shell version

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: Version Info

Shalom,

ssh -v or -vvv will provide you version information.

To know what is installed on an HP-UX system is more problematic.

openssh can be compiled or installed as a depot.

swlist -l product | grep -i secure

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: Version Info

Hi (again):

> SEP: ssh -v or -vvv will provide you version information.

No, the lowercase 'v' is for debugging messages. One 'v' is verbose' two 'v's is very verbose. You need an UPPERCASE 'V' for version information.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: Version Info

Well, SEP and JRF are both correct.

SSH -V will show version info.

# ssh -V (upper case 'V')
# ssh -V
OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5, OpenSSL 0.9.7m 23 Feb 2007
HP-UX Secure Shell-A.05.10.007, HP-UX Secure Shell version

However, doing an 'ssh -v' (lower case 'v') will also show the version info on the first 2 lines of the debug/verbose output.

# ssh -v hqumf01
OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5, OpenSSL 0.9.7m 23 Feb 2007
HP-UX Secure Shell-A.05.10.007, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to hqumf01 [170.7.2.200] port 22.
...
...
...
...

The cleanest way is definitely the use of the upper case '-V' option.
James R. Ferguson
Acclaimed Contributor

Re: Version Info

Hi (again):

> Patrick: Well, SEP and JRF are both correct...doing an 'ssh -v' (lower case 'v') will also show the version info on the first 2 lines of the debug/verbose output.

Ah, so it does! I ignored that since the bulk of the output in that case is usage information. Thanks Patrick for correcting me!

Regards!

...JRF...