0

I want to open multiple ports for ssh server and want to add some users to specific port only.How I can do this?

James
  • 3
  • 2

1 Answers1

2

First, reread man sshd and man sshd_config.

Then, re-think your desire - is this the best/easiest way to do it? It looks like a Hard Way to me.

Then, create multiple versions of /etc/ssh/sshd_config, (e.g. /etc/ssh/sshd_config.Port22, /etc/ssh/sshd_config.Fred, ...) each differing at least in

# What ports, IPs and protocols we listen for
Port 22

the port number. Make any other changes to each version of /etc/ssh/sshd_config that you want to.

Then, look at /etc/init.d/ssh and /etc/init/ssh.conf (which is how sshd gets started), modify them to start multiple sshds, using the -f <configfile> switch to select different configurations.

waltinator
  • 36,399