Stop hunting for that one specific remote port tunnel you opened weeks ago

SSH & Remote Administration

Stop hunting for that one specific remote port tunnel you opened weeks ago

🧩 The Challenge

Dealing with a dozen open SSH tunnels is a nightmare when you forget which local port maps to which remote database. I’ve spent way too much time grepping through my process list trying to figure out where I redirected my traffic.

💡 The Fix

Just peek into the socket status of your SSH client using ss and you will see the tunnel details immediately. It saves you from restarting connections just to be sure where you’re pointing.

ss -tpn | grep ssh

⚙️ Why It Works

By filtering the socket table for active SSH processes, you get a clean view of the established connections including the local and remote port mappings. You’re basically asking the kernel to show you exactly where those pipes go.

🚀 Pro-Tip: Alias this as tunnelwatch in your .bashrc so you don’t have to remember the flags.

Linux Tips & Tricks | © ngelinux.com | 8/22/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted