Skip to content

AC17dollars/ssh-gpg-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SSH and GPG Key Management Utilities

Contains scripts for managing SSH and GPG keys, including backup, restoration, security hardening, and brute force protection.

Scripts

key-util.sh

  • Backup and restore SSH and GPG keys
  • Harden SSH configuration
  • Usage: ./key-util.sh {backup|restore|harden-ssh}

fail2ban.sh

  • Configure fail2ban to prevent SSH brute force attacks
  • Set up SSHD jail with custom configuration
  • Usage: ./fail2ban.sh

Security Features

SSH Hardening

  • Disables password authentication
  • Disables challenge-response authentication
  • Enables public key authentication only
  • Changes default SSH port (configurable)

Fail2ban Configuration

  • Monitors SSH login attempts
  • Bans IP addresses after 3 failed attempts
  • 10-minute ban time
  • Configurable via jail.local

Usage

  1. Make scripts executable:

    chmod +x key-util.sh fail2ban.sh
  2. Run key-util.sh:

    ./key-util.sh backup    # Backup SSH and GPG keys
    ./key-util.sh restore   # Restore SSH and GPG keys
    ./key-util.sh harden-ssh  # Harden SSH configuration
  3. Run fail2ban.sh:

    ./fail2ban.sh          # Configure and start fail2ban

Requirements

  • Linux system
  • sudo privileges
  • fail2ban (will be installed by fail2ban.sh)
  • SSH and GPG installed

About

Contains scripts for managing SSH and GPG keys, including backup, restoration, security hardening, and brute force protection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages