Enable SSH on the Pi, connect from your phone, switch to key-based login, and move files over SFTP. About ten minutes, start to finish.
SSH is off by default on Raspberry Pi OS. Pick whichever fits:
pi user, so the username you set here is the one you
log in with.sudo raspi-config,
go to Interface Options → SSH, and enable it. Or run:sudo systemctl enable --now ssh
Then find the Pi's address on your network:
hostname -I
The first address it prints, something like 192.168.1.42,
is what your phone will connect to. Your iPhone needs to be on the same
Wi-Fi network.
This guide uses Malvek, a free SSH and SFTP app for iPhone, but the steps are similar in any SSH client.
ssh command makes.
Tap Trust & continue. If that fingerprint ever changes later, you'll get a red
warning.Passwords work, but a key is both safer and quicker, since you never type anything.
mkdir -p ~/.ssh && chmod 700 ~/.ssh
echo 'PASTE-PUBLIC-KEY-HERE' >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
The SSH key guide covers importing a key you already have, and what to do if you lose the phone.
Optional hardening: once key login works, you can turn off
password logins by setting PasswordAuthentication no in
/etc/ssh/sshd_config and running
sudo systemctl restart ssh. Test that your key works
first, or you can lock yourself out.
Long-press the host and choose Browse files. You can move around the Pi's file system, see Unix permissions, and upload or download files without leaving the app. SFTP runs over the same SSH connection, so there's nothing extra to set up on the Pi. The file transfer guide covers uploads, downloads and saving to the Files app.
hostname -I again. Setting a DHCP
reservation for the Pi on your router stops the address from changing.~/.ssh is 700, that authorized_keys
is 600, and that the whole key ended up on one line.