From 6888c924d53fb12992afe377487f53b22213dbe7 Mon Sep 17 00:00:00 2001 From: Gerhard Gonter <ggonter@gmail.com> Date: Thu, 29 Dec 2016 15:04:41 +0100 Subject: [PATCH] compatibily issue with CentOS release 6.8 (Final) --- show_fingerprints.pl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/show_fingerprints.pl b/show_fingerprints.pl index 46c2afc..19bc01e 100755 --- a/show_fingerprints.pl +++ b/show_fingerprints.pl @@ -42,8 +42,11 @@ foreach my $file (@files) sub get_ssh_version { - my @cmd= qw(ssh-keygen --version); # apparently, there is way to display the version directly + # my @cmd= qw(ssh-keygen --version); # apparently, there is way to display the version directly + my @cmd= qw(ssh-keygen -?); # apparently, --version does not fail as expected on some systems, e.g. openssh-5.3p1-118.1.el6_8.x86_64 + # print "cmd: ", join (' ', @cmd), "\n"; my $res= `@cmd 2>&1`; + # print "res=[$res]\n"; my $version= 'unknown'; my $has_E= 0; @@ -58,6 +61,16 @@ sub get_ssh_version ($version, $has_E); } +=head1 COMPATIBILITY + +=head2 Ubuntu + +* openssh-client 1:7.2p2-4ubuntu2.1 + +=head2 CentOS + +* openssh-5.3p1-118.1.el6_8.x86_64 + =head1 TODO optionally display fingerprints using other hashing algorithms -- GitLab