Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,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 whomever posted them. This site is not responsible for what they say.
10.4: Multiple sshd ports, one plist file.
Authored by: don_coleman on Fri, Feb 15 2008 at 7:43AM PST
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 | # ]