SSH connection timed out: how to fix it from Android

An SSH "connection timed out" error means your phone sent a request to the server and nothing answered before the client gave up. The cause is almost always on the path between you and the server (wrong address, a firewall, a closed port or a network you cannot reach), not your password or key.

This page walks through the checks in the order that finds the problem quickest, with the exact commands to run on the server side.

Timed out, refused, or name not found?

Different errors point at different problems, so read the message first:

If you see a timeout, keep reading.

Step 1: Check the address and the network you are on

  1. Confirm the IP address on the server itself:
hostname -I
  1. Compare it with what you typed on the phone. Home routers often hand out a new address after a reboot.
  2. Look at where your phone is. An address such as 192.168.1.20 or 10.0.0.5 is private. It only works when the phone is on the same Wi-Fi as the server, or connected through a VPN into that network. On mobile data it will time out every time.

Step 2: Make sure the SSH service is running

On the server (or with a keyboard and screen attached to it):

sudo systemctl status ssh

On some distributions the service is called sshd:

sudo systemctl status sshd

If it is inactive, start it and enable it at boot:

sudo systemctl enable --now ssh

Then check which port it listens on:

sudo ss -tlnp | grep ssh

You should see 0.0.0.0:22 or [::]:22. If the port is different, use that number in your connection.

Step 3: Open the port in the server firewall

On Ubuntu and Debian with UFW:

sudo ufw status
sudo ufw allow 22/tcp

On Fedora, Rocky or AlmaLinux with firewalld:

sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload

A firewall that drops packets produces a timeout, not a refusal, which is why this step matters so much.

Step 4: Check the cloud firewall (VPS and cloud servers)

Cloud servers have a second firewall outside the machine. On AWS it is the security group, on Google Cloud it is a VPC firewall rule, and most VPS dashboards have a Firewall or Networking tab. Add an inbound rule that allows TCP port 22 from your address, or from anywhere if you rely on keys and have password login turned off.

Step 5: Test the port from the phone

Before trying SSH again, test whether the port answers at all:

  1. Ping the server. A reply proves the address is reachable, though some servers block ping on purpose, so no reply is not final.
  2. Check the port. A port checker tells you whether TCP port 22 accepts a connection.

If ping works and the port check fails, the problem is a firewall or the SSH service. If both fail, the problem is the address or the network.

Step 6: Reaching a home server from outside

If the server is at home and you are on mobile data, a timeout is expected unless you have set up a way in. The two common options:

Doing these checks with ShellPilot

ShellPilot is an SSH client, SFTP file manager and server manager for Android that needs no account. It puts the checks above on the same screen as your connections:

  1. Open Network tools and ping the server address.
  2. Use the port checker with port 22 (or your custom port). If it reports closed, go back to steps 2 to 4.
  3. When the port answers, open your saved connection and log in with your password or SSH key.
  4. Once connected, the server health view shows CPU, load, memory, disk and Docker containers over SSH, with nothing to install on the server.

Get ShellPilot on Google Play

Quick checklist

Check Command or place
Right IP hostname -I on the server
SSH running sudo systemctl status ssh
Listening port sudo ss -tlnp
Server firewall sudo ufw allow 22/tcp
Cloud firewall security group or firewall tab, TCP 22 inbound
Same network Wi-Fi with the server, or a VPN

FAQ

Why does SSH work on my laptop but time out on my phone? The laptop is usually on the home or office network, while the phone may be on mobile data. A private address like 192.168.x.x cannot be reached from mobile data. Join the same Wi-Fi or use a VPN.

Does changing the SSH port stop timeouts? Only if your network blocks port 22. Some public and work Wi-Fi networks do. If you move SSH to another port, open that port in every firewall and use it in your connection.

The connection times out after a few minutes of idle time. Is that the same problem? No. That is an idle connection being dropped by a router or the server. Add ClientAliveInterval 60 to /etc/ssh/sshd_config on the server and restart SSH with sudo systemctl restart ssh.

We use cookies

We use cookies and similar technologies to enhance your browsing experience, analyze site traffic, and personalize content and ads. By clicking "Accept", you consent to our use of cookies. Learn more in our Privacy Policy.

cosmovexhome.md
Get the app

~/cosmovex/untitled.md unsaved

Your work keeps moving.So should you.

Built for the hours spent watching a terminal wait. Something new from this studio is nearly ready — and it isn't for your desk.

Be first to hearComing soon. Details land in the studio newsletter — the same one below, nothing extra to join.
Meanwhile, the toolkit

~/cosmovex/home.md · rendered with Markdown Editor & MD Viewer

A Markdown editor good enough to write its own homepage.

This page is a Markdown document. You're reading the rendered preview — press or hit if you don't believe it. That round trip — plain text in, a clean document out — is what Markdown Editor & MD Viewer does on your Android phone. Free, offline, no account.

markdown Live Server — 2 editors, 1 file
# Two cursors, one document
My phone is hosting this file over Wi-Fi,
and my desktop is ed
> nothing leaves the device — it's your Wi-Fi, your file
▶  Install free on Google Play★ 4.7 on Play · 10,000+ installs · free

## New in v1.5 — watch it work

✓Version History — every save snapshotted; browse and restore
✓Works offline — no account, no cloud — files stay on your device

## Just shipped

Both offline-first, both free to try.

## The rest of the toolkit

One app per job. No 200 MB do-everything bloat.

AppJobRating
Markdown Editor & MD ViewerWrite and preview Markdown on mobile.4.7★ · 5K+installios
WebEva: Build Websites & CodeBuild websites from your phone.4.4★ · 5K+installios
PDF Viewer & Editor - AIEdit, convert & sign PDFs on mobile.4.9★ · 1K+installios
HTML Viewer & Editor - CodeView & edit HTML on mobile.4.6★ · 1K+installios
SQLite Editor & SQL LearnerManage SQLite databases on mobile.5.0★ · 1K+install
Python IDE - Offline CompilerWrite and run Python on your phone.4.1★ · 1K+install
Aspenote: Offline Voice to TextIt writes it down. On your phone.—install
HostPilot: PHP Server & SQLTurn your phone into a web server.—install
DevBuddy: Offline Dev ToolkitYour pocket developer toolkit.—installios
ShellPilot - Batch SSH ClientSSH terminal & SFTP on the go.— · 1K+installios
API Client -REST & HTTP TesterTest APIs anywhere, anytime.— · 500+installios
JSON Editor - Viewer & FormatView, edit & format JSON instantly.— · 500+installios
Java & Kotlin Compiler IDEWrite and run Java on your phone.4.4★ · 1K+install
XML Viewer & EditorView, edit & validate XML on mobile.— · 5K+installios
Open CSV — Viewer & EditorOpen and edit CSV files on mobile.— · 500+installios
JavaScript Editor — React IDERun JavaScript and React on your phone.— · 1K+install
Image to SVG Converter, ViewerConvert images to SVG and edit vectors on mobile.— · 1K+install
YAML / YML Viewer & EditorView, edit & validate YAML instantly.— · 500+install
Network Toolkit: WiFi IP ToolsNetwork utilities and diagnostic tools.— · 500+install
Code Editor - Text & NotepadEdit text files on mobile.— · 500+install
C / C++ Compiler IDECompile & run C and C++ on your phone.—install
Diagram Maker: Flow & ERDDraw flowcharts & ERDs on mobile.—install
QR Scanner & GeneratorScan codes with confidence—install
Zip Extractor — Unzip RAR 7ZOpen ZIP, RAR, and 7Z files—install
PromptCrate: AI Prompt ManagerYour personal AI prompt library—install

## Free web tools

Background RemoverSnapglowSQLite ViewerQueryDrill

## Questions, answered

Is there a free Markdown editor for Android?

Yes — Markdown Editor & MD Viewer is free on Google Play. It gives you a split-view editor with live preview, syntax highlighting, and HTML/PDF export, and it works fully offline with no account.

Can I edit Markdown from my phone on a desktop browser?

Markdown Editor & MD Viewer includes a Live Server: your phone hosts the document over Wi-Fi and you edit it from any desktop browser with two-way live sync. The file never leaves your device.

Can I make Mermaid diagrams on Android?

Yes — the built-in Mermaid Studio turns plain text into flowcharts, sequence and class diagrams, with pan/zoom and SVG export, right on your phone.

Can I turn Markdown into slides or a PDF on my phone?

Presentation Mode turns any Markdown document into a fullscreen slide deck, and export produces styled HTML or print-ready PDF — all generated on-device.

## From the journal

We're a small studio with one rule: each app does a single job well, works offline, and never asks who you are.

## Stay in the loop


  1. All 25 apps
  2. Guides
  3. Journal
  4. About
  5. Contact
  6. Privacy
  7. Terms

© 2026 Cosmovex — EOF