How To Turn On Your Mac’s SFTP Server

By Dan Hinckley

no responses. »

One of the greatest advantages of OS X is that it is built on a UNIX based platform and includes many of its best capabilities. One such feature is built in SFTP capabilities. SFTP isn’t a pretty application like TimeMachine or any of the apps included in iLife. Its a protocol that allows you to easily transfer files from one computer to another when not directly connected to it through a network. SFTP is built into the operating system and requires that you enable it with a few tweaks in System Preferences and maybe an adjustment to your home router settings.

To enable SFTP access to your Mac:

    1. Open System Preferences and select Sharing
System Preferences - Sharing - SFTP - OSX-1.png
    1. Next, make sure that Remote Login is enabled. You can allow any of the user accounts on your system to connect through remote login or you can specific specific users that you’d like to connect. If you’d like to create an account for a specific individual that doesn’t have access on your account then see additional details in the next section of this article.
Sharing - Remote Login.png
  1. 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 (We use Cyberduck) 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.

If you’d like to create a user for a guest or friend to access a file on your computer you’ll need to do the following:

Open System Preferences and select Accounts

System Preferences - Accounts.png

 

  • Click the plus button and create a new account. Set the New Account to Standard and enter in the account credentials including username and password.
  • After you create the account you’ll need to modify a few settings on the account. Select it in the Accounts window and right click on it. Select Advanced Options.
  • In the Advanced Options windo, be sure to set the login shell to something like /bin/sh/ Be sure that /false is not included. Set a home directory for the user. I often set it to one of my other users public folders. This will allow the individual to connect to your computer and have access to read and write to the public folder but not have the ability to look into other folders on the file system.

 

System Preferences.png

 

  • Now you should be able to connect with that user through SFTP by entering the account credentials into your SFTP client.

 

Configuring Your Router

If you’ve followed the above steps and are still having trouble connecting to your Mac you may need to make adjustments to your router. Each router handles this slightly differently but you’ll need to set port forwarding on the router to point to the Mac that you just configured for SFTP access. Be sure that port 22 is set to forward to your internal network IP assigned to your Mac by your router (This is often something like 192.168.1.X). After your ports are configured correctly your router will direct any traffic on port 22 to your Mac and allow yourself or others to connect to your Mac via SFTP.

About Dan Hinckley
Dan Hinckley is an experienced Mac user who converted to Apple products when they introduced them on Intel Processors. He loves helping others get more out of their devices! Subscribe to Maciverse.com to get the latest from Dan and the Maciverse Team!! Find out more about Dan:

No comments. Be the first !

Leave a Reply

Site powered by Go Fish Digital