Configuring – SFTP on Mac

Sometimes it is necessary to use SFTP rather than FTP to communicate with a FTP site. Some FTP sites remove regular FTP access for security reasons and insist on using the more secure SFTP.

Photo Upload uses the third party utility curl to perform internet operations. Both Windows (version 10 and 11 only) and Mac ship with a version of curl, but on both platforms the provided version of curl supports FTP and not SFTP. On Windows the plug-in provides its own more capable version of curl that includes support for SFTP. But, presumably for security reasons, Mac does not allow the plug-in to provide its own version of curl.

If you want to use SFTP on Mac then you will need to install a local version of curl that is more capable than the built-in Mac version. And for many non-technical Mac users this is easier said than done.

If you’re a Mac expert then you may have an alternative way to install and use and updated version of curl, but for everyone else, who is comfortable using a terminal prompt, then these are the steps that worked for me.

Install Homebrew

This method described here is using Homebrew as a way to install an updated curl on a Mac. The existing version of curl is not overwritten.

To start the install, download and execute the install script from Homebrew by entering the following from a terminal prompt:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Homebrew curl

Enter the following from a terminal prompt:

$ brew install curl

Check the capabilities of Homebrew curl

Enter the following from a terminal prompt:

$ /usr/local/opt/curl/bin/curl --version

You should see something like:

curl 7.74.0 (x86_64-apple-darwin19.6.0) libcurl/7.74.0 (SecureTransport) OpenSSL/1.1.1i zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.0 libssh2/1.9.0 nghttp2/1.42.0 librtmp/2.3
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink MultiSSL NTLM NTLM_WB SPNEGO SSL TLS-SRP UnixSockets zstd

The key piece of information here is the protocol “sftp” included in the “Protocols” line. This means that the version of curl supports using SFTP.

Configure the plug-in to use Homebrew curl

You next need to configure Photo Upload to use this version of curl.

Use the “Configuration” button to open the plug-in’s Configuration window.

In the “Folder with ‘curl’ binary” setting enter the path to Homebrew curl from earlier, i.e.:

/usr/local/opt/curl/bin/curl

Press OK to save the setting.

Test the version of curl used by the plug-in

From within the Configuration window click on the “Test connection” button.

This will show the version of curl being used and whether it appears to be functioning correctly.

In the above screenshot you can see the curl version is 7.74.0.

Enter your SFTP site connection details

In the plug-in’s main “Photo Upload – Account” section, click “Connect to FTP” box.

If the plug-in is correctly using curl with SFTP then you will see SFTP included in the example text.