Skip to main content

SSH relay-based reverse shell tool for IT troubleshooting

Project description

BridgeMe

SSH relay-based reverse shell tool for IT troubleshooting.

Overview

BridgeMe allows IT administrators to troubleshoot remote machines through an SSH relay server, eliminating the need for multiple users to have SSH access. Only the troubleshooter needs SSH credentials - clients connect through a simple Python tool.

Installation

pip install bridgeme

Quick Start

Host Mode (Troubleshooter)

# Connect to your SSH relay server and create tunnel
bridgeme --host user@relay.example.com

# Output:
# ╭─ BridgeMe Host Ready ─────────────────────────────╮
# │  Session ID: abc123de                             │
# │  Client command:                                  │
# │  bridgeme connect relay.example.com:12345         │
# ╰───────────────────────────────────────────────────╯

Client Mode (Machine needing help)

# Run the command provided by the host
bridgeme connect relay.example.com:12345

# Output:
# ╭─ BridgeMe Client Connected ───────────────────────╮
# │  Host is now controlling your terminal            │
# ╰───────────────────────────────────────────────────╯

Features

  • Cross-platform: Works on Windows, macOS, and Linux
  • Auto-shell detection: Automatically uses PowerShell, cmd, bash, or zsh
  • SSH key support: Uses existing SSH keys and SSH agent
  • Session management: Multiple concurrent troubleshooting sessions
  • Reconnection support: Clients can reconnect if disconnected
  • Graceful error handling: Clear error messages and connection status

Architecture

[Client Machine] ←→ [SSH Relay Server] ←→ [Troubleshooter Machine]
     bridgeme              tunnel              bridgeme --host
  1. Host runs bridgeme --host SSH_SERVER - creates reverse tunnel
  2. Client runs bridgeme connect SSH_SERVER:PORT - connects through tunnel
  3. Result: Host gets terminal access to client machine for troubleshooting

Commands

Host Commands

# Start host mode
bridgeme --host username@relay.example.com
bridgeme host relay.example.com --port 2222 --username admin

# Show status
bridgeme status

# Close sessions
bridgeme close --all
bridgeme close abc123de

Client Commands

# Connect to host
bridgeme connect relay.example.com:12345

Utility Commands

# Show version
bridgeme --version

# Show help
bridgeme --help

Requirements

  • Python 3.8+
  • SSH access to a relay server (host only)
  • Network connectivity between all machines

Dependencies

  • paramiko>=2.7.0 - SSH client functionality
  • click>=7.0 - CLI interface
  • psutil>=5.0.0 - System information
  • colorama>=0.4.0 - Cross-platform colors

Optional Dependencies

  • pywinpty>=1.1.0 - Better Windows terminal support

Install with: pip install bridgeme[windows]

Security Considerations

  • Only the troubleshooter needs SSH credentials
  • All communication is encrypted through SSH tunnels
  • Sessions are isolated and automatically cleaned up
  • No permanent access is granted to client machines

Troubleshooting

Connection Issues

If connection fails:

  1. Verify SSH access: Ensure you can SSH to the relay server manually
  2. Check SSH keys: Use ssh-add -l to verify SSH agent has keys
  3. Network connectivity: Ensure all machines can reach the relay server
  4. Firewall settings: Check that required ports are not blocked

Common Error Messages

  • Authentication failed: SSH keys not properly configured
  • Connection refused: Relay server not reachable or SSH service down
  • Port allocation failed: Too many concurrent sessions (restart)

Development

# Clone repository
git clone https://github.com/yourusername/bridgeme.git
cd bridgeme

# Install in development mode
pip install -e .

# Install development dependencies
pip install -e .[dev]

# Run tests
pytest

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues and questions:

  • Create an issue on GitHub
  • Check existing issues for solutions
  • Review troubleshooting section above

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

bridgeme-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

bridgeme-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bridgeme-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for bridgeme-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f08c78b333439c5f7d76edd62cbd3fb7449fa5fab505be87eeb4faf73e58235
MD5 070d78de5040b36c04c3d5abf1bf82e6
BLAKE2b-256 00711b341a6f4b5c3bd2b3ab5763c5b7d1956aba173730f0a09315b30adb6baa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bridgeme-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for bridgeme-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fabf73b28472f466ab40f97ecbfb58629df98980cc41f860cee7c637383ae0b9
MD5 8b33479f510f31bf1bd36dd301dd5bbc
BLAKE2b-256 ba9fc488b57c995ac883158a2d2b06196817ce557956901708a0bb1d969d65be

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