Operating System - HP-UX
1834253 Members
1877 Online
110066 Solutions
New Discussion

A good guild for installing SSH with TCP Wrappers

 
Travis Harp
Advisor

A good guild for installing SSH with TCP Wrappers

I have the SSH depot as well as the TCP Wrapper depot from the HP site.

I'm new to using either of these and wonder if anyone has a good guide that would show me how to TCP Wrap SSH correctly.

Thanks
Eagles may soar but weasels don't get sucked into jet engines.
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: A good guild for installing SSH with TCP Wrappers

Hi Travis,

There are two cases to configure ssh with tcp_wrappers.

1. If it is already compiled with tcp_wrappers. Then it will respond to /etc/hosts.allow and /etc/hosts.deny files. Put the following line in
/etc/hosts.deny

ALL: ALL

If the SSH was precompiled with tcp_wrappers, then it should deny all connections to ssh with a message in syslog.log

If so, then edit /etc/hosts.allow and add the entries like

sshd: .yourdomain.com otherhost.otherdomain.com

etc.,

it will allow connections only from any host from your domain and only other host from other domain.

If ssh does not respond to hosts.deny file, then you will need to configure in inetd.conf to make the 'tcpd' as the proxy to your sshd in the following way.

2. Configure your ssh in the following way

ssh stream tcp nowait root /opt/tcp_wrappers/sbin/tcpd /opt/openssh2/sbin/sshd

Try the above test again with hosts.deny and hosts.allow

However, running sshd through inetd will slow your ssh connections and it is not preferred.

Look at tcp_wrappers man page to find the format of hosts.allow and hosts.deny files.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Travis Harp
Advisor

Re: A good guild for installing SSH with TCP Wrappers

Thanks for the info guys. I'm going to get to digesting all of it.

Travis
Eagles may soar but weasels don't get sucked into jet engines.