Hi Ankush, I believe you can do this by running a different sshd for each unique port (using ListenAddress, Port) that you wish to allow ssh connections to, then use the "AllowUsers" configuration property for each respective sshd to limit the logins on each port to given users. You will need to modify or duplicate the sshd service script to cater for this, and have multiple sshd_config files, one for each unique port. >
hey Mr. Ben, I tried to do the same as you told me. I created another service sshd1 under /etc/init.d I changed some settings for sshd1 service like CONFIG_FILE=/etc/ssh/sshd_config1 PID_FILE=/var/run/sshd1.pid SSHD=/usr/sbin/sshd1 [ -f /etc/sysconfig/sshd1 ] && . /etc/sysconfig/sshd1 /var/lock/subsys/sshd1 the settings in /etc/ssh/sshd_config1 file Port 3455 Listen Address 192.168.1.45 PermitRootLogin no AllowUsers raju the settings under /etc/ssh/sshd_config are default except I change the listen address to 192.168.1.45 and disabled the connection for IP6. I restarted the sshd & sshd1 service but I am got the below error and I am not able to ssh on the port 3455 whereas on port 22 I can ssh. I have also copied /usr/sbin/sshd to /usr/sbin/sshd1 and had also added this in the /etc/init.d/sshd1 file sshd1[4238]: error: Bind to port 22 on 192.168.1.45 failed: Address already in use. May 31 17:32:17 cluster1 sshd1[4238]: fatal: Cannot bind any address. sshd1 is listenting on port 3455 not on 22. I have also added this line in /etc/modprobe.conf to disable ip6 alias net-pf-10 off How to get rid of this problem ? Thanks & Regards Ankush Grover