Sftp Server For Mac Os X

Sftp Server For Mac Os X Average ratng: 5,6/10 8305 votes

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.

On occasion you may want to exchange data with someone else. You’d like to grant that person access to your system (or network) but in such a way that the person has limited access to other areas of the system (or general resources on your network). This article will show you how to setup a chrooted jail that restricts the user to only SFTP on Mac OS X Leopard. It further limits the user so that they cannot traverse the filesystem outside the bounds you specify.

What version of macOS are you using? Since macOS is Unix, most versions shipped with ftpd. You configure it to launch at startup by opening a terminal and typing. Nov 11, 2017 In this screencast tutorial I cover how to replace FTP with SFTP. FTP has been removed from macOS Server in version 5.4 which has left many users looking for other options for uploading files to. Transfer files with FTP, FTPS, SFTP and Cloud Services (Including SSH Terminal). Sep 29, 2011 Each of these FTP/SFTP server tricks work in all new versions of OS X, be it OS X Yosemite 10.10.x, 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.

Mac Os X 10.7 Download Free

If you the exchange is one way (for example you want someone to be able to download a file), you can sometimes post it to a website and send them the URL. But sometimes you want to be able to exchange files back and forth. Of course for small files, email is the most obvious way to do this these days.

Another way that is increasingly used is to restrict the user to a specific portion of the computer that serves as the exchange intermediate (sometimes called a chrooted jail). FTP servers often offer such a facility, but more often people are moving away from FTP to other mechanisms. There are third party applications such as RSSH that can be used to create chrooted environments using secure transfer methods like SSH. They work, but sometimes they can be difficult to set up (or are not supported on the platform of choice).


Mac OS X Leopard 10.5.5 or higher
Server or Client version
Remote login enabled (SSH/SFTP)
A user account that is allowed to remotely access the system (in this example the user account name is bubbrubb)

All commands are performed as root (or via sudo). If root is disabled on your system, you can use sudo or ‘sudo su’ to root.

An important restriction for this to work, is that where ever your files exist on the computer the path to those files must be owned and only be writable by root. A simple example:


The root directory (/) needs to be owned by root, and only writable by root. Similarly the directory foo must also be owned by root and only writable by root. The group and everyone permissions can be readable or executable, just not writable.

Another example. Say you want your files to be stored on a drive separate from your main OS drive:


Microsoft sftp server

Again, /, /Volumes and the volume Storage must all be owned by root and only writable by root.

If you are wondering how a user would write to the disk if only root owns it, I’ll explain that in a bit.

Storage Location Setup

For this example we’ll use /Volumes/Storage. (Note, you can do this via symlinks too, but for now, we’ll just use the disk structure that Mac OS X sets up on disk insertion).

Make a directory for your user:

The above does the following:

1) Create a path to the general storage location that only root can modify. (this will not work, if this isn’t true, the connection will outright fail).

2) Create a directory that bubbrubb owns and can write to. We restrict the other permissions so that only user bubbrubb can read and write there (you could log into the server using bubbrubbs account OR modify the group permissions so that others accounts in that group can read and write there too). The important part is that all folders leading up to that one are writable only by root.

SSH Remote Access

First test that the user account you want to restrict can ssh into your system. If that works, then continue. If not, figure out why, then:

Then edit sshd_config commenting out the line:

and adding the line:

Then add a block similar to the follow (substituting the User name for the appropriate name on your system):

On Leopard Server the match criteria take effect immediately (that is you do not need to restart the service), you may need to on Leopard Client.

Note that in the above Match statement we place the user into the directory one level up from where they can write. Remember, that the path that the user logs into by default can only be writable by root. Once the user logs in, they cd to their directory and can then write files there.

Precision tune auto care clarkston ga. At Your Service. At Precision Tune Auto Care, we work hard to keep your car on the road.Because we go the extra mile, you get a lot more of them from your car. Count on Precision Tune for complete car care.

User connections and uploading files

First try connecting via ssh:

The connection will hang after you type in your password. Press control-C to cancel the connection. If it goes through some setting didn’t take effect.

Then try with sftp:

If you made it this far, then you have successfully set up your chrooted jail.


This does not appear to work on systems running Leopard earlier than 10.5.5. I tried this using a system running 10.5.4 and it failed. I didn’t do an exhaustive test. YMMV.

Sftp Server For Mac Os X 10 12

I can’t stress this enough. The path permissions up to and including the entry point for the jail MUST be owned by root and writable only by root. If not, the connection will fail.

Sftp Server For Mac Os X Download

You can increase the verbosity of the sftp connection using the -v, -vv, or -vvv flags with SFTP.

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
    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.
  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:

Mac Os Ftp Server

Open System Preferences and select Accounts


Mac Sftp Server

  • 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.
  • Now you should be able to connect with that user through SFTP by entering the account credentials into your SFTP client.

Configuring Your Router

Os X Ftp Server

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.