Monday, November 06, 2006

change the default sshd port on Mac OS X

It is not easy just like changing something in sshd_config on linux-box.

Found hints on macosxhints.com

Add following two lines into /etc/services:

ssh2 112233/udp # SSH Remote Login Protocol
ssh2 112233/tcp # SSH Remote Login Protocol

In /System/Library/LaunchDaemons, find a file called "ssh.plist" which contains a key called "SockServiceName":
SockServiceName
ssh

Replace "ssh" with "ssh2" which is defined above:
SockServiceName
ssh2

You can reboot or just reload sshd:
launchctl unload /System/Library/LaunchDaemons/ssh.plist
launchctl load /System/Library/LaunchDaemons/ssh.plist

No comments: