I had a custom port by using the "Port" line in /etc/sshd_config. After updating to Mac OS X 10.12.4 I found I could no longer connect on the custom port - instead it was listening on port 22. I found that my sshd_config had apparently been renamed to sshd_config~previous, so I moved it back to the correct spot and restarted sshd from the command line using
sudo launchctl stop com.openssh.sshd; sudo launchctl start com.openssh.sshd. However, after the restart sshd was still listening on port 22. I then opened System Preferences and under sharing clicked on "Remote Login". Running `netstat -a -n" showed that port 22 was no longer being listened to. I then click on "Remote Login" to restart sshd, and then found sshd was still listening on port 22, not my custom port.
In /var/log/apache2 I see an empty
access_log on startup, and
error_log contains the normal startup message. No clues there.
How do I get sshd to listen on my custom port again?