Tcp-wrappers should be enabled to start and stop the sshd2 server. Upon execution, inetd reads its configuration information from a configuration file which, by default, is /etc/inetd.conf. There
must be an entry for each field of the configuration file, with entries for each field separated by a tab or a space.
Edit the
inetd.conffile, vi/etc/inetd.confand add the line:ssh stream tcp nowait root /usr/sbin/tcpd sshd -i
The -i parameter is important since it specifies that sshd is being run from inetd. Also, update your
inetd.conffile by sending a SIGHUP signal, killall -HUP inetd after adding the above line into the file.To update your
inetd.conffile, use the following command:[root@deep] /#killall -HUP inetdEdit the
hosts.allow file, vi/etc/hosts.allowand add the line:sshd: 192.168.1.4 win.openna.comWhich means client
192.168.1.4with host namewin.openna.comis allowed to ssh on the server.Note
These
daemonstrings for tcp-wrappers are in use by sshd2:- sshd, sshd2
The name sshd2 was called with usually sshd.
- sshdfwd-X11
if you want to allow/deny X11-forwarding.
- sshdfwd-<port-number>
for tcp-forwarding.
- sshdfwd-<port-name>
port-name defined in
/etc/services. Used in tcp-forwarding.
If you do decide to switch to using ssh, make sure you install and use it on all your servers. Having ten secure servers and one insecure is a waste of time.
