Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bartezzini

macrumors newbie
Original poster
Apr 22, 2011
1
0
:confused: I have to change SSH default port on Snow Leopard server. There's a hint that works with my home snow leopard but don't work on server why?
This method edit ssh.plist
Code:
<key>Sockets</key>
<dict>
        <key>Listeners</key>
        <dict>
                <key>SockServiceName</key>
                <string>ssh</string>
                <key>Bonjour</key>
                <array>
                        <string>ssh</string>
                        <string>sftp-ssh</string>
                </array>
        </dict>
        <key>Listeners2</key>
        <dict>
                <key>SockServiceName</key>
                <string>22022</string>
        </dict>
</dict>
 
What is up with the Listeners2?

You can define the port on the existing listener. For example:

Code:
<key>Sockets</key>
        <dict>
                <key>Listeners</key>
                <dict>
                        <key>Bonjour</key>
                        <array>
                                <string>ssh</string>
                                <string>sftp-ssh</string>
                        </array>
                        <key>SockServiceName</key>
                        <string>22022</string>
                </dict>
        </dict>

Also, to have it take effect immediately:
Code:
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
Code:
sudo launchctl load /System/Library/LaunchDaemons/ssh.plist
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.