Skip to content

This script is an SSH Log Viewer, a powerful tool for system administrators to monitor and analyze SSH login attempts on Linux systems using systemd's journalctl.

License

Notifications You must be signed in to change notification settings

emadasefi/SSHLOGv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SSHLOGv Script (SSH Log Viewer)

====================================

This script is an SSH Log Viewer, a powerful tool for system administrators to monitor and analyze SSH login attempts on Linux systems using systemd's journalctl.

🌟 Description

The SSH Log Viewer is a bash script designed to provide system administrators with an efficient way to monitor and analyze SSH login activities on Linux systems that use systemd's journalctl for logging. It offers a user-friendly interface with multiple viewing and filtering options, making it easier to track successful logins, failed attempts, and potential security threats.

The script utilizes journalctl to access SSH logs and presents them in a formatted, easy-to-read table. It dynamically adjusts to the terminal width, ensuring optimal display across different environments. The script extracts key information from each log entry, including date, time, session type, username, authentication method, source IP, and more.

With its menu-driven interface, users can easily switch between different viewing modes and apply various filters. The script also includes a save functionality, allowing users to export filtered logs for further analysis or record-keeping.

🎯 Features

  • Live Stream: Real-time monitoring of SSH login attempts
  • Last 10 Logs: Quick view of recent SSH activities
  • User Filtering: Analyze logs for specific users
  • Failed Sessions Filtering: Focus on unsuccessful login attempts
  • Date Filtering: Examine logs from a specific date
  • Save Functionality: Export filtered logs to a file
  • Responsive Design: Adapts to terminal width for optimal display
  • Detailed Log Information: Extracts and displays key details from each log entry
  • User-friendly Interface: Easy-to-navigate menu system
  • Error Handling: Checks for journalctl availability and provides appropriate error messages


  • 🖼️ ScreenShots :

    SSH Log Viewer



    💡 How to Install and Run It :

  • Save the script to a file (e.g., sshlogv.sh)
  • Make the script executable:
  • chmod +x sshlogv.sh
  • Run the script with sudo privileges
  • sudo ./sshlogv.sh
  • Navigate through the menu options using the number keys
  • Follow on-screen prompts to filter, view, and save logs


  • 📜 Note

  • This script requires journalctl, which is typically available on systems using systemd. Ensure you have the necessary permissions to access SSH logs. The script will check for journalctl availability and provide an error message if it's not found.


  • — Feedback ❤️—

    Please leave a comment if you have any comments, suggestions or problems.

    About

    This script is an SSH Log Viewer, a powerful tool for system administrators to monitor and analyze SSH login attempts on Linux systems using systemd's journalctl.

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Languages