1. 启动FTP Server:
命令行下,
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
stop:
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
确认已经启动:
ftp localhost
2. 启动SFTP Server:
打开 System Preferences -> sharing,勾上"Remote Login",如下: 同样,测试sftp是否成功打开:
sftp localhost
3. 设置log level:
打开 sshd_config,我这里是 "/etc/sshd_config", 找到类似该行: Subsystem sftp /usr/libexec/sftp-server 改成:Subsystem sftp /usr/libexec/sftp-server -l INFO INFO 就是log level,可能的level option有(从左到右,越来越详细): QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3