Tool for viewing SSH connections
Project description
WhereMyTunnels
WhereMyTunnels is a cross-platform tool for viewing SSH connections and tunnels.
Usage
usage: wheremytunnels [options]
Tool for viewing SSH connections
options:
-h, --help show this help message and exit
--version, -v show program's version number and exit
--about, -a Show information about WhereMyTunnels
--interval, -i INTERVAL
Refresh interval in seconds (default: 2)
--no-color Disable colored output
--show-connections Displays attached connections I.E: "LISTEN 127.0.0.1:8081", "ESTABLISHED 15.1.2.5:12385 -> 8.5.1.4:80"
--show-arguments Shows SSH arguments I.E: "ssh test.com -L 8080:localhost:80"
Why does this exist?
During a CTF in late 2024, I found myself five SSH tunnels deep while pivoting between hosts trying to find a flag when I suddenly got disconnected from my ssh jump box.
When I finally got back in, all my notes were gone, and I was left with one question: Where My Tunnels?
How does this work?
- Enumerates active ssh processes using psutil
- Parses ssh processes into:
- Master sockets (-MS) and attached socket forwards/sessions (-S)
- Traditional tunnels (-L, -R, -D)
- Traditional SSH sessions
- Find associations between processes, forwards, and connections
- Detect errors in forwards and connections I.E: a local forward that doesn't have an attached listening connection
- Render everything in a tree structure using rich
Linux Install
Download the wheremytunnels binary from the release page, see (Which linux binary do I pick?) for help
Then run:
chmod 755 wheremytunnels_latest_linux.bin
mv wheremytunnels_latest_linux.bin /usr/bin/wheremytunnels
Which linux binary do I pick?
glibc vs musl
Nearly all linux systems use glibc or the GNU C Library, including:
- Ubuntu
- Debian
- Fedora
- CentOS / RHEL
- Kali
- Arch Linux
However some more "unique" operating systems rely on musl, notably Alpine linux
Architecture
Most systems run on the x86_64 cpu architecture, however some devices use ARM (aarch64)
The simplest way to tell is by running uname -m, you could also determine this by looking at your cpu specifications
Windows Install
There is currently only an x86_64 install for windows, sorry ARM users
After downloading the windows binary run:
Move-Item -Path "wheremytunnels_latest_windows.exe" -Destination "~/AppData/Local/Microsoft/WindowsApps/wheremytunnels.exe"
Examples
wheremytunnels.exe
wheremytunnels.exe --show-arguments --show-connections
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wheremytunnels-1.2.0.tar.gz.
File metadata
- Download URL: wheremytunnels-1.2.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57262a152f7f7f4acf9bf3c0d10e5bd920f9f15c1aa37d0e633af09f362ba37c
|
|
| MD5 |
623deeea058e8f164301d91d0fee921c
|
|
| BLAKE2b-256 |
3c6bdc24016b8cd066e16602d74758aac40401ca33d55a73ca85b30b279bd44d
|
Provenance
The following attestation bundles were made for wheremytunnels-1.2.0.tar.gz:
Publisher:
publish.yml on Androsh7/WhereMyTunnels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wheremytunnels-1.2.0.tar.gz -
Subject digest:
57262a152f7f7f4acf9bf3c0d10e5bd920f9f15c1aa37d0e633af09f362ba37c - Sigstore transparency entry: 1571481438
- Sigstore integration time:
-
Permalink:
Androsh7/WhereMyTunnels@cf95fb1fb984b15481316310c07d02db721206d8 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/Androsh7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf95fb1fb984b15481316310c07d02db721206d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wheremytunnels-1.2.0-py3-none-any.whl.
File metadata
- Download URL: wheremytunnels-1.2.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0425169375a61fb1194ceae68b50021a653ed583744e8ca77b0d993c370046
|
|
| MD5 |
c028127b419310df1ba811d8e87dbfad
|
|
| BLAKE2b-256 |
387ecc5b16bb9d7086841367a9abc354ffff2950ba18cbaa655103e21c698b09
|
Provenance
The following attestation bundles were made for wheremytunnels-1.2.0-py3-none-any.whl:
Publisher:
publish.yml on Androsh7/WhereMyTunnels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wheremytunnels-1.2.0-py3-none-any.whl -
Subject digest:
8a0425169375a61fb1194ceae68b50021a653ed583744e8ca77b0d993c370046 - Sigstore transparency entry: 1571481444
- Sigstore integration time:
-
Permalink:
Androsh7/WhereMyTunnels@cf95fb1fb984b15481316310c07d02db721206d8 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/Androsh7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf95fb1fb984b15481316310c07d02db721206d8 -
Trigger Event:
push
-
Statement type: