>_ Malvek

How to transfer files between your iPhone and a server

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.

What you need

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.

1. Open the server's files

  1. Add the server as a host if you haven't already (hostname or IP, port 22, username).
  2. Long-press the host and choose Browse files. (A plain tap opens a terminal; the folder icon in the terminal's top bar opens the same file browser.)
  3. On the first connection, check the host key fingerprint and accept it. This is the same check the 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.

2. Upload from iPhone to the server

  1. Go to the folder where the file should go.
  2. Tap Upload here (the upload icon in the top bar).
  3. Pick a file in the iOS Files picker. It can come from On My iPhone, iCloud Drive, or any other provider that appears in Files.

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.

3. Download from the server to iPhone

  1. Tap the file, or long-press it.
  2. Choose Download. A progress bar shows while it transfers.
  3. When the share sheet appears, choose Save to Files, AirDrop it to a Mac, or send it to another app.

If you dismiss the share sheet, tap Open on the “Downloaded” message to bring it back.

4. Check a file without downloading it

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.

Troubleshooting

Get Malvek on the App Store Raspberry Pi guide vs. Termius & Blink