Skip to content

klpod221/ssh-eye

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH-Eye: Real-time SSH Session Monitor

A lightweight, terminal-based dashboard for monitoring active SSH sessions, sending webhook alerts, and managing connections in real-time.

Last Commit GitHub Stars Repo Size License
GitHub Sponsors Buy Me a Coffee

📝 Description

SSH-Eye is a modern, lightweight monitoring tool designed for Linux servers that provides real-time visibility into SSH activity. Built with C++ and FTXUI, it offers a beautiful terminal user interface (TUI) to track connected users, identify potential security threats, and manage active sessions instantly.

Beyond simple monitoring, SSH-Eye acts as a sentinel for your server, integrating seamlessly with communication platforms like Telegram, Slack, and Mattermost/Discord to send instant webhook alerts whenever a new SSH connection is detected. It empowers administrators to kill suspicious sessions directly from the dashboard and inspect running processes for each connection, all without leaving the terminal.

🚀 Table Of Contents

✨ Features

  • 📊 Real-time Dashboard: Beautiful TUI displaying active sessions, uptime, and alert stats.
  • 🔔 Instant Alerts: Send webhook notifications to Telegram, Slack, or any custom endpoint on new connections.
  • 🛡️ Session Control: Terminate (kill) suspicious SSH sessions directly from the UI (requires root).
  • 🔍 Deep Inspection: View running processes (PID, CPU%, Mem%) for any active session.
  • 📁 Smart Log Detection: Automatically detects auth logs (auth.log, secure, messages) on various Linux distros.
  • ⚡ Lightweight & Fast: Written in C++ for minimal resource footprint.

📸 Screenshots

Add screenshots here

📦 Installation

Download the latest binary from the Releases page.

chmod +x ssh-eye
sudo ./ssh-eye

🛠 Building from Source

Prerequisites

  • C++17 compiler (GCC/Clang)
  • CMake (3.10+)
  • libcurl development headers

Debian/Ubuntu

sudo apt update
sudo apt install build-essential cmake libcurl4-openssl-dev

Arch Linux

sudo pacman -S base-devel cmake curl

Build Steps

git clone https://github.com/klpod221/ssh-eye.git
cd ssh-eye
mkdir build && cd build
cmake ..
make -j$(nproc)

🎮 Usage

Running

To use all features (including killing sessions and reading system logs), run with sudo:

sudo ./ssh-eye

Or use the provided Makefile shortcut:

make run-sudo

Keyboard Shortcuts

Key Action
Navigate session list
D Toggle Process Detail panel
K Kill selected session (Root only)
Y / N Confirm / Cancel Kill action
Tab Switch between Dashboard / Settings / About
q Quit application

⚙️ Configuration

Configuration is stored in ~/.config/ssh-eye/config.json. You can edit this file manually or use the Settings tab in the application.

{
    "webhook_url": "https://your-webhook-url...",
    "platform": 0, // 0: Telegram, 1: Slack, 2: Mattermost, 3: Custom
    "enable_alerts": true
}

💻 Tech Stack

  • Language: C++17
  • UI Framework: FTXUI (Functional Terminal User Interface)
  • Networking: CPR (C++ Requests)
  • JSON: nlohmann/json
  • Build System: CMake

📄 License

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


Made with ❤️ by klpod221

About

// Real-time SSH Session Monitor

Resources

License

Stars

Watchers

Forks

Packages

No packages published