#244 SSHD Module - some sshd don't have -h

Other
open
nobody
None
5
2001-12-13
2001-12-13
Anonymous
No

HI!

Your index.cgi script for webmin ssh module in ...

[pacheco@machine sshd]$ more module.info
category=servers
depends=0.91
desc_pl=Serwer SSH
desc=SSH Server
version=0.91
name=SSHD

can't check this ssh daemon version ...

pacheco@machine pacheco]$ telnet 0 22
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
SSH-1.99-2.4.0 SSH Secure Shell (non-commercial)
...

[pacheco@machine pacheco]$ locate sshd2

...

/etc/ssh2/sshd2_config
/usr/local/sbin/sshd2
/usr/local/man/man5/sshd2_config.5
/usr/local/man/man8/sshd2.8
[pacheco@machine pacheco]$ /usr/local/sbin/sshd2 -h
sshd2: SSH Secure Shell 2.4.0 (non-commercial version) on
i686-pc-linux-gnu
WARNING: sshd2: Failed to read config file
/home/pacheco/.ssh2/sshd2_config
sshd2: option -h needs an argument
[pacheco@machine pacheco]$

*** MANPAGE ***

NAME
sshd2 - secure shell daemon

SYNOPSIS
sshd2 [-d debug_level_spec] [-f config_file]
[-h host_key_file] [-o options] [-p port] [-v]
[-g login_grace_time] [-i] [-q]

*** RPM Package INFO ***

[pacheco@machine pacheco]$ rpm -qi ssh
Name : ssh Relocations:
(not
relocateable)
Version : 2.4.0 Vendor: SSH
Release : 1 Build Date:
Wed 06 Dec 2000
12:49:22 AM WET
Install date: Wed 21 Nov 2001 02:33:17 PM WET
Build Host:
tiger.us.ipsec.com
Group : Applications/Internet Source RPM:
ssh-2.4.0-1.src.rpm
Size : 11482871 License:
See LICENSE.
Packager : Anne Carasik <anne@ssh.com>
URL : http://www.ssh.org/
Summary : SSH Secure Shell, non-commercial version
Description :
SSH Secure Shell, non-commercial version.

So i think that it would be useful for some people if
this change below
takes place in the next sshd.wbm. (Just a sugestion)
-:> (Not everyone
installs ssh daemons with rpm -i))

--> index.cgi

$out =`rpm -qi ssh | grep Version`;
my $hostname=`hostname`;

print "<tt><b>$hostname\'s</b> SSH daemon:
","$out","</tt><p>\n";
print "<hr>\n";

if ($out =~ /(Version\s+\:\s)([0-9\.]+)(\s+Vendor\:.*)/i) {
$out="sshd version $2";
}

INSTEAD of

index.cgi:29: $out = `$config{'sshd_path'} -h 2>&1`;

--
Paulo Pacheco
Systems Administrator

Discussion