天天看點

Configuring SSH Secure Shell for TCP Wrappers Support

To enable usage of TCP Wrappers with SSH Secure Shell, perform the following operations:

If SSH Secure Shell was previously installed from binaries, you may want to uninstall it before continuing.

Compile the source code:

Then, become root and run

Locate <code>libwrap.a</code>

Run <code>configure</code> again:

Note: It is only necessary to specify the path to <code>libwrap.a</code> if the library and the include files are located in a non-standard directory, i.e. if the library has been compiled to a local directory, or has been installed to somewhere else than the default location.

The typical setup is to deny access to everyone listed in the <code>/etc/hosts.deny</code> file. (This example shows both ssh1 and ssh2.)

or simply

And then allow access only to trusted clients in the <code>/etc/hosts.allow</code>:

Based on the <code>/etc/hosts.allow</code> file above, users coming from any host in the ssh.com domain or from the host foo.bar.fi are allowed to access.