ShellSage
ShellSage mobile SSH port forwarding secure tunnel to a private dashboard
MOBILE SSH

SSH Port Forwarding on Mobile: A Comprehensive Guide

Learn how to set up SSH port forwarding on your mobile device using ShellSage.


ShellSage tutorial: add an SSH port-forwarding tunnel on mobile in under a minute.

Short answer: SSH port forwarding lets you reach a service that only your server can see, like a database bound to localhost, by tunneling it through your phone's live SSH session. ShellSage turns the classic ssh -L command into a three-field form, so you set one up in under a minute without memorizing any flags.

What is SSH port forwarding, in plain English?

A tunnel opens a port on your phone that pipes through your SSH session to a service the server can reach. You point an app at 127.0.0.1:<port> on the phone, and the traffic lands on the remote service. The classic case is a database such as Postgres on 5432, MySQL on 3306, or Redis on 6379 that is bound to the server's own localhost and closed to the public internet. The tunnel makes that private service feel like it is running right on your phone.

Where do you find it in ShellSage?

Connect to a host, then tap the menu button (the three lines) in the terminal key bar. The menu has a Port forwarding option, sitting right alongside Ask Sage, Install a tool, and Generate SSH key.

The ShellSage terminal menu showing the Port forwarding option
The terminal menu has a Port forwarding option, one tap away from any session.

The tunnels screen

Tapping Port forwarding opens a screen that explains tunnels in plain language and lists the ones you have already added. On a fresh session you will see a short explainer and a single big Add tunnel button.

The ShellSage Port forwarding screen with the tunnel explainer and Add tunnel button
The Port forwarding screen spells out what a tunnel does and lists yours.

How do you add a tunnel?

Tap Add tunnel and fill in three things:

Tap Add tunnel and the forward is live for this server. No ssh -L 5432:localhost:5432 user@host to type, and nothing to get wrong on a phone keyboard.

The New tunnel form with label, local port, remote host and remote port fields
Setting up a tunnel is three fields: label, local port, and the remote host and port.
It is the same secure mechanism the pros use on the desktop, turned into a three-field form you can fill with your thumbs.

A real example: reach a private database

Say Postgres runs on your droplet bound to localhost:5432 and closed to the outside world. Add a tunnel with local port 5432 and remote localhost:5432. Now open your database client, or psql, against 127.0.0.1:5432 on the phone and you are talking to the server's Postgres, encrypted end to end through SSH, without ever exposing the port publicly.

Why is this safer and faster?

The local end of every tunnel binds to 127.0.0.1 on your phone only, so nothing else on the network can ride it. You never open a firewall port, never expose the database, and never have to recall the exact ssh -L syntax under pressure. It is the same secure tunnel, minus the friction, which means you can check an internal dashboard or query a private database from the train in about thirty seconds.

⚡ Key takeaways

Saqlain Bukhari
Your Questions, Answered

Frequently Asked Questions

Reaching a service that only the server can see, such as an internal database or an admin dashboard bound to localhost, securely through your existing SSH session.
No. ShellSage gives you a form with a label, a local port, and the remote host and port, then builds the tunnel for you.
Yes. The traffic rides your existing encrypted SSH session and the local end binds to 127.0.0.1 on your phone only, so nothing else on the network can use it.
Yes. Add as many tunnels as you need, each with its own label and local port, and manage them from the Port forwarding screen.
Topics this guide covers
ssh port forwardingssh tunnel mobilessh port forwarding androidssh port forwarding iphonessh local port forwardssh tunnel appport forwarding from phonessh -L mobileaccess remote database from phonereach internal service sshssh tunnel to databasemobile ssh clientssh client apptermius alternativessh from phonesecure tunnel mobileforward port ssh phoneconnect to remote database mobilessh tunnel localhostdevops mobile app
Download ShellSage free
ShellSage is an AI-first SSH terminal with Sage built in: it explains output, fixes broken commands, and previews the blast radius before anything runs. Start on the free Hobby plan with no credit card, and get a 7-day full-Pro trial when you want everything.
← More tutorials