Each of these FTP/SFTP server tricks work in all new versions of OS X, be it Mavericks 10.9, Mountain Lion 10.8, or 10.7 Lion.
Start the FTP Server in OS X
This will start a generic FTP and FTPS server on the Mac, but not an SFTP server:
• Launch the Terminal (/Applications/Utilities) and enter the following command to start the FTP server:
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
• Confirm the FTP server works by typing:
If you see the familiar FTP login:
$ ftp localhost
Connected to localhost.
220 ::1 FTP server (tnftpd 20100324+GSSAPI) ready.
You know the server is running. If you don’t see that, then the server either hasn’t finished starting yet or you didn’t enter the command properly. You can then ftp from other computers to your new server via the same ftp command, or by using the “Connect to Server” option in the Finder.
Disable FTP or SFTP Server in OS X
Here’s how to disable the FTP server:
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
As the command suggests, this unloads the ftp daemon and shuts down the server. Obviously you can only shut down and disable the FTP server if it was enabled to begin with.
Disabling SFTP is just a matter of unchecking the “Remote Login” box that sits within the Sharing Preference Panel of OS X.
Note: The FTP and SFTP servers are different, and enabling one does not enable the other. SFTP is recommended because of the default encryption layer and secure transferring.