Skip to content

3xecut0r/ssh_log_cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH Log Cleaner

Simple tool to clean SSH logs and user traces when users disconnect from the server.

  • Monitors active SSH sessions
  • Automatically cleans logs when users disconnect
  • Removes authentication logs, command history, and system logs
  • Can clean logs for specific users manually

Requirements

  • Linux server with root access
  • Rust compiler installed

Build

  1. Clone repo
  2. Run the build script:
chmod +x build.sh
./build.sh

This creates a static binary ssh_log_cleaner in the current directory.

Usage

Monitor mode (automatic cleaning)

sudo ./ssh_log_cleaner monitor

Clean specific user

sudo ./ssh_log_cleaner clean username
sudo ./ssh_log_cleaner clean username 192.168.1.100

What gets cleaned

  • /var/log/auth.log - SSH authentication logs
  • ~/.bash_history, ~/.zsh_history - Command history
  • /var/log/syslog, /var/log/messages - System logs
  • /var/log/wtmp - Session logs

Install globally

sudo cp ssh_log_cleaner /usr/local/bin/

⚠️ Warning

This tool removes system logs. Use responsibly and ensure compliance with your security policies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors