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 remote-notify

Usage

# Interactive mode (recommended)
remote-notify

# 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)

$ remote-notify

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/remote-notify/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/yourusername/remote-notify.git
cd remote-notify

# 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.0.tar.gz (20.0 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.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: whisper_ssh-1.0.0.tar.gz
  • Upload date:
  • Size: 20.0 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.0.tar.gz
Algorithm Hash digest
SHA256 53b6027811586668eaa629ee252dec8084fb35296596d778b8c38ab6b278f79b
MD5 126b9c8c093915cd14c35494c7e469c0
BLAKE2b-256 ea94d0187a6c069417fdb8262064584195c7660b508d750616ae03d7ec4e72ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: whisper_ssh-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 274b07aa6a912625bf1bcaa4e59a6785005cd03199602969cbfee64f8fb185f4
MD5 e100c6c62a84f0ab72a359af071d4625
BLAKE2b-256 6dc6924e295ac533719d080dcf65880c87cc8840060d8d353bb5505e204eb03e

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