I have a server with several IP addresses that hosts sites on each IP address. I have one ip address that does not have a site associated with it. I want to allow SSH login only to the one IP address that does not have a site associated with it. Is this possible? If so can anyone tell me how to accomplish this?

1 Answer 1


Take a look at ListenAddress in your sshd_config.

         Specifies the local addresses sshd(8) should listen on.  The
         following forms may be used:

               ListenAddress host|IPv4_addr|IPv6_addr
               ListenAddress host|IPv4_addr:port
               ListenAddress [host|IPv6_addr]:port

         If port is not specified, sshd will listen on the address and all
         prior Port options specified.  The default is to listen on all
         local addresses.  Multiple ListenAddress options are permitted.
         Additionally, any Port options must precede this option for non-
         port qualified addresses.
  • One could also have IPTables drop packets to that port that aren't directed at the correct IP address.
    – ewanm89
    Oct 28, 2012 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.