4

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

14

Take a look at ListenAddress in your sshd_config.

ListenAddress
         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.
1
  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .