Strict Standards: Declaration of RSS::DoAction() should be compatible with CMSModule::DoAction($name, $id, $params, $returnid = '') in /home/xandaorg/public_html/modules/RSS/RSS.module.php on line 114

Strict Standards: Non-static method PageInfoOperations::LoadPageInfoByContentAlias() should not be called statically in /home/xandaorg/public_html/index.php on line 154

Warning: Cannot modify header information - headers already sent by (output started at /home/xandaorg/public_html/modules/RSS/RSS.module.php:114) in /home/xandaorg/public_html/index.php on line 299
Xanda - /dev/project - Force OpenSSH (sshd) to listen on selected multiple IP address only

So how do you force sshd to listen on multiple IP addresses? Let us say you have total 8 public IP address and one private IP address. You would like to bind sshd to one selected public IP (ex 70.5.xx.xx) and private IP ( only.

Luckily there is an easy way to achieve this using ListenAddress option. It specifies the local addresses sshd should listen on. If this directive is skipped from configuration file sshd will bind or list on all available IP address.

Open sshd_config:

# vi /etc/ssh/sshd_config

Specify multiple ip address on each new line with ListenAddress (multiple ListenAddress options are permitted):



Save and close the file.

Restart the sshd:

# /etc/init.d/sshd restart

Verify that sshd is only listing to specified IP address:

# netstat -tulpn | grep :22


tcp        0      0    *                   LISTEN      26472/sshd
tcp 0 0* LISTEN 26472/sshd

This is good if public SSHD IP address is not available due to configuration issues. You can always login via private IP connected to KVM or on board server IPMI card