Change Mac OS X's ssh server port

Quick way to change your sshd server's port.

Like many things in Mac OS X server administration, changing your server port relies on editing a plist file.

For instance, to change your ports to 4022, just edit /System/Library/LaunchDaemons/ssh.plist to look like so, replacing the named sockets with numbers:

<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>4022</string>
<key>SockFamily</key>
<string>IPv4</string>
<key>Bonjour</key>
<array>
<string>4022</string>
</array>
</dict>
</dict>

Comments (0)


Sudo Hints
http://www.sudohints.com/article.php/20160620150233554