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.1.0.tar.gz (269.8 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.1.0-py3-none-any.whl (268.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: auto_portforward-0.1.0.tar.gz
  • Upload date:
  • Size: 269.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 f781887122720dbb363ac55e3a413b2766df0e81568213f46bf86856ec1a80b1
MD5 b8772d5c41b69bea7cafec3579c35100
BLAKE2b-256 bffeb3bfa8404caf0ebac6d1da248b9ec55bdbbf7e7d7877b11be4ff8df32d1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for auto_portforward-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adaaeba9e6b07acbdbeb2116001115e786b59b3980eea6f828da78d429baf4f6
MD5 1e9387349b09ace89a2198eb17a51f29
BLAKE2b-256 0b12ce2166e1f2622f443d7164fe9f92861e2f84a629b4e87352c15685cd8ec8

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