Skip to main content

Whisper messages to remote Linux machines via SSH

Project description

📡 Remote Notify

PyPI version Python 3.7+ License: MIT

Send desktop notifications to remote Linux machines via SSH with a beautiful, interactive command-line interface.

✨ Features

  • 🎯 Smart Host Management - Automatic DNS resolution and SSH connectivity testing
  • 👤 User Management - Remember users per host for quick selection
  • 💬 Flexible Messaging - Preset messages plus custom message support
  • 🔒 Secure - No password storage, secure SSH connections
  • 🎨 Beautiful Interface - Rich terminal UI with colors and interactive menus
  • 📦 Easy Installation - One command pip install
  • Fast Setup - Auto-configuring with sensible defaults

🚀 Quick Start

Installation

pip install whisper-ssh

Usage

# Interactive mode (recommended)
whisper-ssh

# Or use the short alias
rnotify

First Run

The tool will guide you through:

  1. Select Target Host - Choose from known hosts or add a new one
  2. DNS Resolution - Automatic hostname/IP resolution and validation
  3. Choose User - Select from previous users or add new
  4. Enter Password - Secure password input (never stored)
  5. Pick Message - Choose from presets or write custom message
  6. Send! - Notification appears on remote desktop

🎯 Use Cases

  • System Administration - Notify users about maintenance, reboots, updates
  • Development Teams - Notify about build completions, deployments
  • Remote Work - Send meeting reminders, break notifications
  • Automation - Integrate with scripts and monitoring systems

📖 Examples

Basic Usage (Interactive)

$ whisper-ssh

Programmatic Usage

from remote_notify import RemoteNotificationManager

manager = RemoteNotificationManager()

# Send a notification
success = manager.send_notification(
    ip_address="192.168.1.100",
    username="john",
    password="secret",
    message="Build completed successfully!",
    title="CI/CD Pipeline"
)

if success:
    print("Notification sent!")

Multiple Hosts

# Send to multiple hosts at once
host_configs = [
    {"ip": "192.168.1.100", "username": "user1", "password": "pass1"},
    {"ip": "192.168.1.101", "username": "user2", "password": "pass2"},
]

results = manager.send_notification_to_multiple_hosts(
    host_configs=host_configs,
    message="System maintenance in 30 minutes",
    title="System Notice"
)

🔧 Configuration

Configuration is automatically stored in ~/.config/whisper-ssh/remote_notify_config.json

Configuration Structure

{
  "hosts": {
    "server1": "192.168.1.100",
    "workstation": "10.0.0.50"
  },
  "users": {
    "server1": ["admin", "developer"],
    "workstation": ["user"]
  },
  "preset_messages": [
    "System maintenance starting in 30 minutes",
    "Please save your work and log off",
    "Meeting starting in 5 minutes"
  ]
}

Built-in Preset Messages

  • System maintenance notifications
  • Reboot warnings
  • Meeting reminders
  • Break notifications
  • Build/deployment status
  • Security updates

🛠️ Requirements

Local Machine

  • Python 3.7+
  • Network access to target machines

Target Machines (Remote)

  • Ubuntu/Linux with desktop environment
  • SSH server running
  • libnotify-bin package installed:
    sudo apt install libnotify-bin
    
  • User logged into desktop session

🎨 Interface Features

Interactive Menus

  • ✅ Arrow key navigation
  • ✅ Searchable host/user lists
  • ✅ Colored output and status indicators
  • ✅ Progress bars and loading indicators
  • ✅ Error handling with helpful messages

Management Features

  • 📋 View all configuration
  • ➕ Add/remove hosts and users
  • 📝 Manage preset messages
  • 🧪 Test connectivity
  • 📤 Export/import configuration
  • 🔄 Reset to defaults

🔒 Security

  • No Password Storage - Passwords are never saved to disk
  • SSH Security - Uses Fabric's secure SSH implementation
  • Input Validation - Prevents shell injection attacks
  • Connection Testing - Validates hosts before attempting connections

🐛 Troubleshooting

Common Issues

"Connection failed"

  • Verify SSH is running: sudo systemctl status ssh
  • Check firewall: sudo ufw status
  • Test manual connection: ssh user@host

"Cannot resolve hostname"

  • Check DNS settings
  • Try using IP address instead
  • Verify network connectivity

"Notification doesn't appear"

  • Ensure user is logged into desktop
  • Check if Do Not Disturb is enabled
  • Verify notify-send is installed: which notify-send

Debug Mode

# Enable verbose SSH output
manager = RemoteNotificationManager()
# Set hide=False in send_notification for debugging

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

# Clone the repository
git clone https://github.com/JdMasuta/whisper-ssh.git
cd whisper-ssh

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black remote_notify/

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

🔗 Links

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

whisper_ssh-1.0.1.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

whisper_ssh-1.0.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file whisper_ssh-1.0.1.tar.gz.

File metadata

  • Download URL: whisper_ssh-1.0.1.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for whisper_ssh-1.0.1.tar.gz
Algorithm Hash digest
SHA256 36063142fab21dff92324ceda8a51f881298e2fb29083941780e14ef5aac29e9
MD5 99f24f4a07a1b528de3bd098ccfcb098
BLAKE2b-256 5693216f28522eee21dbcd6db210c6d8b27d1906430fd611f7a6f2e853395e56

See more details on using hashes here.

File details

Details for the file whisper_ssh-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: whisper_ssh-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for whisper_ssh-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10014a4fca085ec0f2f62c4bd227dd83d07847d4f121c6405c6805c10193dcd2
MD5 ab8627a3b7b93d437a6e37075da24e09
BLAKE2b-256 e60a9172f8204dcf4b7683ad1a5d878538160918d9895858ccb78051f7805dc1

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