OS X Mountain Lion 修改 openssh sshd_config 配置
Posted | archive
OS X的蛋痛特性是 `launched
。如果你需要修改sshd的监听端口,那么
编辑 /System/Library/LaunchDaemons/ssh.plist
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>ssh-alt</string>
</dict>
然后在/etc/services
里定义:
ssh-alt 12345/tcp # ssh-alt
然后重启sshd服务:
sudo launchctl uload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
蛋碎!
Comments