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?

migrated from security.stackexchange.com Oct 28 '12 at 6:50

This question came from our site for information security professionals.


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 '12 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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