Free English lessons with Andrew.

SFTP Server OSX Mojave


Remote Login is a feature in Mac OS X’s Sharing preferences that allow remote users to connect to a Mac in a secure fashion. Additionally, it includes and enables the SFTP server, which is the secure replacement for FTP.

In System Preferences, create a user for SFTP for example sftp_username, and specify a home folder, for example /users/sftp_username/inbox.

In System Preferences click on the “Sharing” preference panel. Select the checkbox next to “Remote Login” to enable it. Clicking the checkbox will start the various remote login servers, including sftp and ssh.

With remote login enabled, your sftp server on your Mac is enabled and you should be able to connect to your Mac with SFTP. Open any SFTP supported FTP client enter your IP address, your account username to login to your Mac and your password. Be sure the port is set to 22 and click connect. If everything is working correctly you should be able to access your Mac file system and folder structure.

Hostname: username@192.168.15.x
Username: sftp_username
Connection: SFTP
Password: xxxxxxxxxxxxxxx
Folder: /users/sftp_username/inbox

Note the entries above will of course depend on how you configured your SFTP user.

FTP operates on two different Transmission Control Protocol (TCP) ports: 20 and 21. FTP ports 20 and 21 must both be open on the network for successful file transfers.

SFTP usually uses port 22 but can be configured to run on nearly any port. Port 22 is generally used for connection via SSH. SFTP is just one of protocols which can be run over SSH (others include virtual terminal). In fact, the SFTP is independent and can be run even without using SSH.

SFTP is sometimes called Secure FTP, which leads to a common confusion with FTPS (which is called Secure FTP too).