Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Multiple sshd ports, one plist file.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Multiple sshd ports, one plist file.
Authored by: don_coleman on Feb 15, '08 07:43:41AM

If you want to listen on multiple ports, you do not need multiple .plist files, nor multiple service names... one will do.

Find the following lines in the ssh.plist file:

----
<key>Sockets</key>
<dict>
<key>Listeners</key>
----

Add new lines as shown below, with the new lines marked with "+":

----
<key>Sockets</key>
<dict>
+ <key>Alternate Listeners</key>
+ <dict>
+ <key>SockServiceName</key>
+ <string>ssh2</string>
+ </dict>
<key>Listeners</key>
----

This assumes you have already edited /etc/services to add ssh2 -- you can also just use a number directly (ie: "222") rather then specifying "ssh2".

If you want more then two port numbers, just change "Alternate Listeners" in the first new line to something unique, and duplicate the 5 additional lines again.

The instructions above about stopping/starting the service and also modifying the firewall still apply.



[ Reply to This | # ]