If a machine accepts SSH, it already accepts SFTP. That covers a VPS, a home server, a NAS, a Raspberry Pi, or a Mac with Remote Login turned on. You don't need Samba, a cloud drive, or anything else installed on the server.
On a Mac, turn on System Settings → General → Sharing → Remote Login first. Most Linux servers have SSH running already. For a Raspberry Pi, see the Raspberry Pi guide.
ssh command makes the first time.The browser opens in your home directory. Tap a folder to go into it, and
tap .. to go back up. To jump straight to a location such
as /var/www or /etc/nginx, tap the path at the top
of the screen to open Go to path. The eye icon shows or
hides dotfiles.
If a file with the same name is already in that folder, you're asked before anything is overwritten. An overwritten file can't be recovered from the phone, so read the prompt carefully.
To upload a photo, use the Photos share sheet's Save
to Files option first, then pick it from Files. Uploads go one file
at a time. To move a whole folder, zip it in Files (long-press the folder,
then Compress) and unzip it on the server with
unzip.
If you dismiss the share sheet, tap Open on the “Downloaded” message to bring it back.
Choose View in the same menu to read a text file on the
server: a config file, a log, or a script. This works for files up to
512 KB. The same menu has Rename and
Delete, and the folder icon at the top creates a
New folder. To edit a file in place, open a terminal on
the same host and use nano or vim.
sudo mv in a terminal./etc/ssh/sshd_config has a
Subsystem sftp line, then restart sshd.