[CentOS] sshd: listen on ip1:port1 and ip2:port2

Eero Volotinen eero.volotinen at iki.fi
Tue Jan 24 12:27:22 UTC 2012

2012/1/24 Alexander Farber <alexander.farber at gmail.com>:
> Hello,
> with CentOS 6.2 - is it possible to configure OpenSSH
> daemon to listen on different IPs _and_ ports?
> I have received a 2nd IP address for my server
> and have successfully configured by adding the new
> "/etc/sysconfig/network-scripts/ifcfg-eth0:1" file.
> I'd like SSHd to keep listening at the_old_ip:22
> but also at the_new_ip:443.
> The 443 on the_old_ip is already taken by Apache,
> so I can't just write "Port 22" + "Port 443" to sshd_config.

How about using iptables to forward 443 to 22? I think it is the
simplest way to do this hack.


More information about the CentOS mailing list