How to SSH into a Raspberry Pi from Android
To SSH into a Raspberry Pi from Android, turn on SSH on the Pi, find its IP address, then connect from an SSH app on your phone using the user name you created and its password. Both devices need to be on the same Wi-Fi unless you have set up a VPN.
Here are the full steps, including the parts that usually go wrong: SSH being off by default, the missing pi user, and .local names that do not resolve on a phone.
Step 1: Turn on SSH on the Raspberry Pi
Raspberry Pi OS ships with SSH turned off. Pick one of these:
Before first boot (Raspberry Pi Imager)
- In Raspberry Pi Imager, choose your OS and storage.
- Open the OS customisation settings.
- Set a user name and password, add your Wi-Fi network, and on the Services tab tick Enable SSH.
- Write the card and boot the Pi.
On a Pi that is already running (with a screen and keyboard)
sudo raspi-config
Go to Interface Options, then SSH, and choose Yes. Or do it in one line:
sudo systemctl enable --now ssh
Newer Raspberry Pi OS images no longer have a default pi user with the password raspberry. You log in with the user you created in the Imager or on first boot.
Step 2: Find the Pi's IP address
On the Pi:
hostname -I
The first address, something like 192.168.1.42, is the one you need. If you have no screen on the Pi, open your router's admin page and look for a device called raspberrypi (or the host name you set) in the list of connected devices.
Many guides use raspberrypi.local. That name relies on mDNS, and not every Android phone resolves .local names inside apps. If the name fails with a "could not resolve" error, use the IP address instead.
Tip: reserve that address for the Pi in your router (often called a DHCP reservation or static lease) so it does not change after a reboot.
Step 3: Connect from your phone
You need any SSH client for Android. The details to enter are the same everywhere:
| Field | Value |
|---|---|
| Host | the IP from step 2, for example 192.168.1.42 |
| Port | 22 |
| User name | the user you created |
| Password | that user's password |
On the first connection the app shows the Pi's host key fingerprint. If you want to confirm it, run this on the Pi and compare:
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
Accept it, and you are at the Pi's shell prompt. Try a few commands:
uname -a
vcgencmd measure_temp
df -h
Step 4: Switch to key login (recommended)
Password login works, but a key is safer and saves typing. Generate a key on the phone, copy its public half, and add it on the Pi:
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
Paste the public key on its own line, save, then:
chmod 600 ~/.ssh/authorized_keys
Disconnect, attach the key to your saved connection, and connect again. When key login works, you can turn off password login by setting PasswordAuthentication no in /etc/ssh/sshd_config and running sudo systemctl restart ssh.
Step 5: Move files to and from the Pi
SSH also carries SFTP, so you can browse the Pi's folders from your phone without setting up Samba or FTP. Open an SFTP view on the same connection and you will see your home folder, for example /home/youruser.
Doing it with ShellPilot
ShellPilot is an SSH client and SFTP file manager for Android that needs no account or sign-up. For a Raspberry Pi it covers the steps above in one app:
- Add a connection with the Pi's IP, port 22, your user name and password, and save it as a profile.
- On first connect, check and accept the host key. ShellPilot keeps known hosts and warns you if the key changes later.
- In Keys, generate an Ed25519 key, use Copy Public Key, and paste it into
~/.ssh/authorized_keysas in step 4. - The keyboard row puts Enter, Esc, Tab, Ctrl and arrow keys above the phone keyboard, which helps in
nanoandraspi-config. - The ready-made command library includes Raspberry Pi snippets, and the server health view shows CPU, load, memory and disk without installing anything on the Pi.
- Browse and download files over SFTP for free. Uploading, renaming and deleting files are part of Pro.
If it does not connect
- Timed out: the phone is not on the same network as the Pi, the IP is wrong, or the Pi is off. Ping the IP first.
- Connection refused: SSH is not running on the Pi. Repeat step 1.
- Could not resolve host: you used
raspberrypi.local. Use the IP address. - Authentication failed: wrong user name or password. Remember there may be no
piuser.
FAQ
Can I SSH into my Raspberry Pi from mobile data?
Not directly if the Pi is on your home network, because its 192.168.x.x address is private. Install a mesh VPN such as Tailscale on both the Pi and the phone and connect to the Pi's VPN address, or set up port forwarding on your router with key login only.
What is the default Raspberry Pi SSH password?
Current Raspberry Pi OS has no default user or password. You set them in Raspberry Pi Imager or during first boot. Older images used pi and raspberry, and you should change that if you still have it.
Do I need to install anything on the Pi for file transfer? No. SFTP is part of the OpenSSH server that already runs once SSH is on.