

change the setting in the /etc/services file.change the setting in the ssh.plist file.The man page with more information can be found by typing man ist or using this link.įrom what I read (and experienced) so far, there are three main methods which can be used: Sudo launchctl load /System/Library/LaunchDaemons/ssh.plist The above edit will also force sshd to listen only over IPV4.Īfter making any changes to ssh.plist, the file must be reloaded as follows: sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist Do the change then restore SIP and reboot. Use sudo mount -uw / in order to enable writing to /System. See How do I disable System Integrity Protection (SIP).įor Catalina, even after disabling SIP, the volumes are unwritable. 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). So the solution is as simple as to use the port number instead of the service name.Īn excerpt from my edited /System/Library/LaunchDaemons/ssh.plist: Sockets 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 Every previous answer is working (as google suggest too), but they are dirty and inelegant.
