Friday, January 7, 2011

Mac OSX Changing SSH Ports

I suggested putting the SSH script in /Library/LaunchDaemons rather than putting it in /System/Library/LaunchDaemons.

LaunchDaemons Example:

/Library/LaunchDaemons/ssh.plist

Modify the services files to reflect the port number:

Services Definition Example: Change port to desired number.
#ssh 22/udp # SSH Remote Login Protocol
#ssh 22/tcp # SSH Remote Login Protocol

Modify the Port in the following file:
vi /private/etc/sshd_config

Run both commands:
launchctl unload ssh.plist
sudo SystemStarter -v restart SSH

No comments:

Post a Comment