Skip to main content

Monitor for local or remote opened ports

Project description

auto portforward

auto-portforward

Overview

auto-portforward is a Python-based TUI application for monitoring processes and managing port forwarding on local or remote (SSH) machines. It provides a real-time, interactive process tree and can automatically set up SSH reverse port forwarding for processes listening on specific ports.

Features

  • TUI interface
  • Monitor processes and their listening ports on local or remote (SSH)
  • Automatic SSH reverse port forwarding for selected ports
  • Works with or without psutil (falls back to lsof/ps)
  • Handles sudo password for privileged commands
  • Clean resource management (no zombie processes, robust cleanup)

Installation

pipx install auto-portforward

Usage

Run the TUI application with:

auto-portforward [options] [ssh_host]

CLI Options

  • -l, --local : Use the local process monitor
  • --mock : Use a mock process monitor (for testing)
  • [ssh_host] : SSH host to connect to

Examples:

  • Monitor local machine:
    python -m auto_portforward.cli --local
    
  • Monitor a remote host via SSH:
    python -m auto_portforward.cli myuser@myhost
    

Sudo Password Handling

Some features (like listing all listening ports) may require sudo privileges.

  • Environment variable:
    export AP_SUDO_PASSWORD=yourpassword
    auto-portforward my@host
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto_portforward-0.2.0.tar.gz (270.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auto_portforward-0.2.0-py3-none-any.whl (269.0 kB view details)

Uploaded Python 3

File details

Details for the file auto_portforward-0.2.0.tar.gz.

File metadata

  • Download URL: auto_portforward-0.2.0.tar.gz
  • Upload date:
  • Size: 270.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for auto_portforward-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e56a9dc790a4a360d4743801d77e96a2626ffe8cc30938bcb963f1687cf48700
MD5 5779efa41725b0a4aee511425521b170
BLAKE2b-256 01e60d9f0e1181131aff54d0dbd08da2233398dd67aa7fe6b942d6b49e042166

See more details on using hashes here.

File details

Details for the file auto_portforward-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_portforward-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ee645f65983e735e923f74805e943248d827b9d9055ed4d5c8c999e12345ed0
MD5 c23787c33c22966dc8874f23a27859c0
BLAKE2b-256 733d80b91bd15fa3be1884985f11ca4490c894a8a0de601884109e982aea4d1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page