How to add multiple port listen SSH on FreeBSD
The way to do is:
1) Edit sshd config “/etc/ssh/sshd_config"
vi /etc/ssh/sshd_config
2) Uncomment the line “# Port 22″ and add new lines according to how many listener ports you wants to be available for the SSH service on your machine.
In this example we wants to add a new listener for port 10022 and still uses the default ssh port 22, so the line should be like:
Port 22
Port 10022
3) Save the config file and restart the SSHD
/etc/rc.d/sshd restart
- Also sometimes is important to allow just some users, so for that feature you need to uncomment or add the line
Multiple users should be listed on the same line
AllowUsers admin1@192.168.1.32 admin2
And reload that changes after save the config file executing:
/etc/rc.d/sshd reload Source: FreeBSD ssh
Multiple users should be listed on the same line, like so:
AllowUsers root@192.168.1.32 admin
