Operating System - Linux
1830231 Members
1704 Online
109999 Solutions
New Discussion

Problem in configuring sshd in inetd.

 
skiran
Advisor

Problem in configuring sshd in inetd.

Hello,

I want to remove sshd startup from RC script and put itin inetd.conf (tcp wrapper).
I have changed /etc services,hosts.allow,inetd.conf files as shown bellow. And killed the running sshd and pkill -HUP inetd. But it didnt work.



bwga507:/etc # uname -a
Linux bwga507 2.4.21-138-smp #1 SMP Fri Oct 31 00:51:31 UTC 2003 i686 unknown
bwga507:/etc # cat /etc/inetd.conf|grep ssh
ssh stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sshd -i
bwga507:/etc # cat /etc/hosts.allow|grep ssh
sshd : ALL : ALLOW
bwga507:/etc # cat /etc/services |grep ssh
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp # SSH Remote Login Protocol

Anything missing?
Could anyone help me on this?
3 REPLIES 3
Alexander Chuzhoy
Honored Contributor

Re: Problem in configuring sshd in inetd.

I see no reason to change anything with sshd.
It is compiled with tcp wrapper.
and after simply putting a line like:

sshd: ALL
in /etc/hosts.deny
you'll prevent access to it
Ivan Ferreira
Honored Contributor

Re: Problem in configuring sshd in inetd.

As Alexaner sayd, tcpwrappers are enabled in the sshd daemon even when it starts as a service.

ldd /usr/sbin/sshd

libwrap.so.0 => /usr/lib/libwrap.so.0 (0x00880000)


The libwrap enables the use of tcpwrappers.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Problem in configuring sshd in inetd.

Shalom,

sshd needs to be running to accept ssh client requests.

If the real purpose is to integrate sshd with tcp wrappers this can be done directly.

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