Every previous answer is working (as google suggest too), but they are dirty and inelegant.
The right way to change the listening port for a launchd handled service on Mac OS X is to make the changes the dedicated keys available in ssh.plist
So the solution is as simple as to use the port number instead of the service name.
An excerpt from my edited /System/Library/LaunchDaemons/ssh.plist
:
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>22022</string>
<key>SockFamily</key>
<string>IPv4</string>
<key>Bonjour</key>
<array>
<string>22022</string>
</array>
</dict>
</dict>
Note:
To be able to edit this file on El Capitan, Sierra and probably future versions as well, you need to disable SIP (System Integrity Protection). See How do I disable System Integrity Protection (SIP).
For Catalina, even after disabling SIP, the volumes are unwritable. Use sudo mount -uw /
in order to enable writing to /System
. Do the change then restore SIP and reboot.
The above edit will also force sshd to listen only over IPV4.
After making any changes to ssh.plist
, the file must be reloaded as follows:
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load /System/Library/LaunchDaemons/ssh.plist
Note that using launchctl stop ...
and launchctl start ...
will NOT reload this file.
The man page with more information can be found by typing man launchd.plist
or using this link.
WebDAV will probably be a little slower than SMB (especially with SSL), but with much fewer headaches since networks are optimized for HTTP access these days. I would definitely do some load testing before making the switch.
Best Answer
The OS X finder uses a very large range of webdav features, including the only example of chunked PUTs. The only server i've found that works well is Apache mod_dav. We use it heavily against Leopard and Maven.
Assid from lighttpd there is also a webdav module for nginx, but it doesn't work at all for properties, and can't do chunked PUTs.
Apple have also released their calender server, which uses CalDAV extentions, so it should work against the finder. I haven't used that product, so can't vouch for it as a general webdav server.
When looking for compatible options you should check out the following projects