Tutorial

How to SSH from Android: a step-by-step guide (2026)

SSH from Android to any server in about five minutes: install, add a connection, password or key auth — plus Raspberry Pi tips and fixes.

CC Chen Chen· Founder·June 9, 2026·6 min read

How to SSH from an Android phone

Yes, you can SSH from Android without rooting your phone. Install an Android SSH client, enter the remote server’s hostname or IP address, SSH port, username, and password or private key, verify the host fingerprint, then connect. Commands run on the remote computer, not on your phone. This guide uses TermAI for the illustrated steps and includes a Termux command-line alternative. TermAI is our own app; these screenshots illustrate the workflow, not a comparative performance test.

Looking for SSH on Android? Choose the direction first: an SSH client for Android connects your phone to a server; an Android SSH terminal lets you type OpenSSH commands locally; an Android SSH server lets a computer SSH into your phone.

Choose an SSH client for Android

For SSH from a phone, choose according to the work you need to do: saved connections, keyboard shortcuts, key import, file transfer, or tunnels. Basic SSH does not require a paid subscription in the options below.

OptionBest fitCost and current status
TermAISaved SSH connections, SFTP, AI command help, built-in TailscaleFree tier includes unlimited SSH and SFTP; paid allowances and checkout prices are shown in the app. See official features.
TermiusSSH on mobile with optional desktop synchronizationFree Starter includes SSH, SFTP, and port forwarding. Pro is US$10/month when paid annually; cloud sync is paid. Check regional and monthly billing prices before subscribing.
ConnectBotA free, open-source Android SSH clientActively developed; the official latest-release link resolved to v1.11.1 when checked.
Termux + OpenSSHA local terminal with scriptable SSH commandsFree and open source. The main app’s latest stable release was v0.118.3; OpenSSH is a separately updated package.

Official sources checked October 14, 2026. Release channels and store builds can differ. For JuiceSSH, verify that your store account can install and update it before relying on it for a new phone; we have not verified a current price or release here. See our Android SSH client comparison for more selection criteria.

Is there PuTTY for Android?

The PuTTY team does not provide an Android version. Use a native Android SSH client or OpenSSH in Termux. If you have a PuTTY .ppk key, use PuTTYgen to export it in OpenSSH format for a client that requires that format. Keep the private key private; the public key belongs on the server.

What you need

  • An SSH client for Android — this guide uses TermAI (free SSH tier).
  • The server's host — an IP address or hostname (for example 192.0.2.10 or pi.local).
  • A username — the account created on the server, or the username specified by your VPS provider.
  • Auth — the account password, or an SSH key (recommended; more on that below).
  • Network reachability — your phone must be able to reach the server: same Wi-Fi/LAN, a public IP, or a mesh VPN like Tailscale for machines behind a home router.

Step 1: Install an SSH client

Install TermAI from the Play Store (or your client of choice) and open it. The free tier covers basic SSH. Menu names and onboarding can vary by app version.

Step 2: Add the connection

Open the SSH tab and tap Add Connection. Fill in a label, the host, the port (22 unless your server uses a custom one), and your username.

The New Connection form in TermAI on Android, with fields for label, host, port, username, and a Password/Key toggle
Step 2: enter the host, port (22 by default), and username. The Password / Key toggle below picks how you authenticate.

Step 3: Choose password or key authentication

Use the Password / Key toggle to pick how you sign in.

  • Password is the quickest to start: just type the account password.
  • Key is more secure and the better long-term choice. You can generate a key in the app and add its public half to the server's ~/.ssh/authorized_keys, or import an existing private key. Protect the private key with a passphrase where supported and review the client’s storage and backup policy. A separate key for your phone makes revocation easier if it is lost.

If you're just trying things out, password is fine. For anything you'll use regularly, switch to a key.

Step 4: Connect

Tap to connect. The first time, you'll be asked to trust the server's host key — that's normal (it's how SSH pins the server's identity). Compare its SHA256 fingerprint with one obtained through a trusted server console or administrator before accepting. On a Linux console, ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub shows the Ed25519 host fingerprint; match the key type displayed by the client. Once verified and authenticated, you’re at a shell prompt. Run whoami, hostname, and pwd to confirm the account and machine.

A successful SSH connection in TermAI on Android showing 'Authentication successful' and a shell prompt
Step 4: 'Authentication successful' and a prompt — you're now running commands on the server from your phone.

Step 5: Use the shortcut keys

The hardest part of a terminal on a phone is the keys a normal keyboard doesn't have. A good Android SSH client adds a row above the keyboard with Esc, Tab, Ctrl, and arrow keys — that's what makes things like Ctrl+C, tab-completion, and editing in vim actually usable. Learn that row and a phone becomes a real terminal.

One more phone-friendly trick: when a command fails, long-press to select the error output and tap 🤖 Ask AI — the assistant gets that exact error as context and explains what went wrong, so you're not squinting at a stack trace and retyping it into a search box.

SSH into a Raspberry Pi from Android

The steps are identical — the only differences are the defaults. Use the username you created in Raspberry Pi Imager; do not assume a default pi account, and the host is the Pi's IP on your network or its .local name. Make sure SSH is enabled on the Pi (Raspberry Pi Imager can turn it on, or sudo raspi-config → Interface Options → SSH). Then add it as a connection exactly as above. If the .local name does not resolve on your phone, use the numeric LAN IP from the router or hostname -I on the Pi. See the official Raspberry Pi SSH documentation.

SSH from Android to Linux, Ubuntu, or a Windows PC

A desktop Linux installation may have an SSH client but no SSH server. On Ubuntu or Debian, run the following on the target computer’s console, not on Android:

sudo apt update
sudo apt install openssh-server
sudo systemctl enable --now ssh
hostname -I

Enter a reachable IP from that output and your Linux login username in the Android client. If UFW is already enabled, allow the actual SSH port, for example sudo ufw allow 22/tcp. A VPS may also require a cloud firewall rule. Prefer a regular user with sudo privileges; many providers disable root or password login. Other distributions use different package managers and may call the service sshd. See Ubuntu’s OpenSSH setup guide.

For Windows, install OpenSSH Server through Optional Features, then run Start-Service sshd in an administrator PowerShell session. Check the OpenSSH-Server-In-TCP firewall rule and connect with your Windows account name and account password, not a Windows Hello PIN. Follow Microsoft’s setup instructions. SSH into WSL requires an SSH server inside WSL plus a reachable network path; enabling the Windows SSH service alone does not configure WSL access.

Set up an SSH key for your phone

Generate a dedicated phone key in your client, or use ssh-keygen -t ed25519 in Termux. Using an existing trusted login or the server console, append its public key as one line to the target user’s ~/.ssh/authorized_keys. Do not replace existing keys. Run these commands as that target user on the server:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
# Append your phone's public key to ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

The directory and file must belong to the login user. Select the matching private key in your Android client and open a new connection to test it before disabling password access. A key passphrase unlocks your private key; it is different from the server account password.

Android SSH terminal: how to SSH from Termux

Termux provides a local shell on your phone; installing OpenSSH adds the remote client. The official installation guide recommends F-Droid or GitHub for most users. Google Play has a separate experimental build for Android 11 and later with differences and missing functionality; it is inaccurate to say every Play build is simply deprecated. Keep Termux and its plugins from the same source.

Run these commands in Termux on Android. Replace the example username and host with yours:

pkg update
pkg install openssh
ssh [email protected]
# Custom port and a specific private key:
ssh -p 2222 -i ~/.ssh/id_ed25519 [email protected]

The client’s destination port is normally 22, even though a Termux SSH server uses 8022. For diagnostics, try ssh -v [email protected]; remove credentials and identifying details before sharing logs. Use exit to end the remote shell.

SSH from a phone over mobile data or home Wi-Fi

On the same LAN, use the server’s local IP. Guest Wi-Fi or access-point isolation can block device-to-device connections. Away from home, a private address such as 192.168.1.20 is not reachable directly over mobile data. Use a VPN or mesh network such as Tailscale, with both devices authorized and network rules allowing the SSH connection, then connect to the server’s VPN address. TermAI offers built-in Tailscale access; other clients can use a separate VPN app.

Router port forwarding is another option, but requires a reachable public address and correctly configured router and host firewalls. Carrier-grade NAT can prevent inbound IPv4 access even after you add a forwarding rule. Do not confuse a router’s port forwarding with an SSH tunnel. Also, localhost in a phone client refers to the phone, not your PC.

Wi-Fi-to-mobile switches and Android background restrictions can interrupt a session. Where appropriate, allow background activity for the client. For long-running work, install tmux on the remote Linux server, start tmux new -s mobile, and reconnect with tmux attach -t mobile. This preserves the remote terminal session; it does not keep an SSH tunnel alive.

Android SSH port forwarding: local, remote, and SOCKS tunnels

Use a client with tunnel settings, or OpenSSH in Termux. For a remote web service listening on the server’s loopback port 3000, run on the phone:

ssh -N -o ExitOnForwardFailure=yes -L 127.0.0.1:8080:127.0.0.1:3000 [email protected]

Keep the connection open and visit http://127.0.0.1:8080 in the phone’s browser. The first loopback address binds the listener on Android; the second is reached from the SSH server. In a graphical client, enter local bind address 127.0.0.1, local port 8080, destination host 127.0.0.1, and destination port 3000. Server policy must permit forwarding.

  • Remote forwarding: ssh -N -R 127.0.0.1:9000:127.0.0.1:8080 [email protected] lets a process on the server reach a service on the phone’s port 8080 through server loopback port 9000. It does not expose that service publicly by default.
  • Dynamic forwarding: ssh -N -D 127.0.0.1:1080 [email protected] creates a SOCKS proxy. Only applications configured to use that proxy send traffic through it; this is not a system-wide Android VPN.
  • Failure cases: a local port already in use, server forwarding restrictions, an unreachable destination, or Android suspending the SSH process can break a tunnel. Bind to loopback unless you deliberately intend to share access.

See the OpenSSH manual for the meanings of -L, -R, -D, and -N.

Android SSH server: how to SSH into an Android phone

To SSH into Android, the phone needs a server, not just a client. Termux can run OpenSSH without root. The resulting shell is the Termux environment with Android app permissions, not unrestricted access to Android or other apps’ private files.

  1. Install Termux from a source recommended above. On the phone, run pkg update and pkg install openssh.
  2. Run whoami to identify the Termux username, then passwd to set a strong temporary SSH login password. Termux does not set one by default.
  3. Start the server with sshd. Its default port is 8022. Find the phone’s Wi-Fi IP in Android’s network details.
  4. From a computer on the same reachable network, run ssh -p 8022 TERMUX_USER@PHONE_IP, substituting the real values. Verify the phone’s host fingerprint before accepting; in Termux, inspect it with ssh-keygen -lf $PREFIX/etc/ssh/ssh_host_ed25519_key.pub.
  5. For regular access, append the computer’s public key to Termux’s ~/.ssh/authorized_keys, set directory/file permissions to 700/600, and test a new key login. Stop the server when finished with pkill sshd, which also terminates active SSH sessions.

The Termux project’s remote-login guidance explains password setup, public keys, and port 8022. If the phone sleeps or Android stops Termux, connections can fail; background settings and termux-wake-lock may help but consume battery. Use termux-wake-unlock afterward. For remote access across networks, establish a reachable VPN path rather than assuming mobile data accepts inbound connections. Shared-storage access requires permission; SSH does not bypass Android’s storage protections.

Troubleshooting the common errors

  • Connection refused — the SSH server isn't running or the port is wrong. Confirm sshd is up and you're using the right port.
  • Connection timed out — a network/reachability problem. Your phone can't reach the host. On mobile data for a home server, you'll need a public IP, port forwarding, or Tailscale.
  • Permission denied / auth failed — wrong username, password, or key. If using a key, confirm its public half is in the correct user’s authorized_keys, file ownership and permissions are correct, and the server permits that authentication method. A password prompt may be absent on key-only VPS images.
  • Host key changed warning — the server's identity doesn't match what was pinned. If you didn't rebuild the server, stop and investigate before continuing.
  • Works on Wi-Fi, fails on mobile data — switch from the LAN address to a reachable public or VPN address; check VPN access rules and cloud firewall restrictions.
  • Tunnel connects but the page fails — confirm the service’s destination host and port from the SSH server itself, and check whether the phone’s SSH connection is still open.
  • Typing a password shows nothing — normal terminal password prompts hide input, including placeholder dots. Type it and press Enter.

FAQ: SSH from Android and into Android

Can I SSH from Android?

Yes. An ordinary Android SSH client can connect to a reachable Linux server, Raspberry Pi, VPS, Mac with Remote Login enabled, or Windows machine running OpenSSH Server. Your phone does not need root.

How do I SSH from an Android phone?

Install a client, add the server address, port (usually 22), username, and password or key. Verify the host fingerprint through a trusted source and connect. In Termux, install OpenSSH and run ssh [email protected]. The illustrated steps above cover the graphical workflow.

How do I use SSH on an Android phone after connecting?

Use the remote prompt to run commands such as whoami or pwd. The shortcut row supplies Ctrl, Esc, Tab, and arrows. Ctrl+C interrupts a foreground command; exit disconnects. Use SFTP for files and remote tmux for work you need to resume after a dropped connection.

Which SSH client for Android should I choose?

TermAI offers saved connections, SFTP, and AI help; Termius suits mobile and desktop workflows with paid sync; ConnectBot is a free open-source choice. Termux with OpenSSH suits people who want command-line tools and scripts. Check key formats, tunnel support, and reconnection behavior for your workflow before migrating.

Is an Android SSH terminal the same as an SSH client?

A terminal displays and accepts shell input. A remote SSH client connects that interface to another machine; a local terminal runs a shell on Android. Termux provides the local environment and can also connect remotely after OpenSSH is installed.

How do I SSH from Android to Linux?

Enable an SSH server on Linux, allow its port through applicable firewalls, and connect from the phone with the Linux account’s username. On Ubuntu, install openssh-server; having an SSH client installed alone is insufficient. Both devices need a reachable LAN, public, or VPN path.

Can I SSH from a phone without Wi-Fi?

Yes, over mobile data, provided the target is reachable. A home server’s private LAN IP will need a VPN path or a properly configured public endpoint. Switching networks can disconnect an existing session.

How do I SSH into an Android phone?

Run an SSH server such as Termux’s sshd on the phone, configure a password or public key, and connect from another device to port 8022. This gives access to Termux’s environment under Android’s permission limits. See the Android SSH server setup.

What port does Android SSH use?

When connecting from Android, use the remote server’s port, usually 22. When connecting into a default Termux OpenSSH server, use 8022. These are different directions; Android clients do not require all remote servers to use 8022.

Can Android SSH do port forwarding?

Yes, with a client that supports tunnels or with OpenSSH in Termux. Local forwarding opens a phone-side port to a destination reached from the server; remote forwarding opens a server-side port to a destination reached from the phone. Dynamic forwarding creates a SOCKS proxy for configured applications. The server must permit forwarding.

Is there an official PuTTY for Android?

No. The PuTTY team does not ship an Android app. Use a native Android SSH client or Termux; convert a PuTTY-format private key with PuTTYgen if your chosen client requires OpenSSH format.

Do I need to pay or root Android to use SSH?

No. Free client options exist, and ordinary outbound SSH does not require root. A non-root Termux server also works on its default high port, but cannot grant access beyond its Android app permissions.

Quick Facts

  • SSH from Android: client → reachable remote SSH server; default destination port 22.
  • Authentication: correct server username plus password or private key; verify the host fingerprint.
  • SSH into Android: run a server such as Termux sshd; default port 8022, no root required.
  • Private home servers: use a reachable VPN path or a configured public endpoint.
  • Port forwarding: supported by suitable clients; keep tunnels open and bind local listeners to loopback.
Try TermAI

Free on iOS and Android. 5 AI requests/day on the free tier, plus unlimited SSH/SFTP and built-in Tailscale.

CC
Chen Chen — Founder of TermAI

Writes about mobile DevOps, terminal UX, and the surprising depth of "boring" infrastructure.