PasswordAuthentication no
PasswordAuthentication no
PasswordAuthentication no
ssh-keygen -t ed25519 -C "[email protected]"
ssh-keygen -t ed25519 -C "[email protected]"
ssh-keygen -t ed25519 -C "[email protected]"
ssh-copy-id -i ~/.ssh/my_ed25519.pub user@your_server_ip
ssh-copy-id -i ~/.ssh/my_ed25519.pub user@your_server_ip
ssh-copy-id -i ~/.ssh/my_ed25519.pub user@your_server_ip
command="/path/to/your/script.sh",no-port-forwarding,no-pty,no-user-rc,no-agent-forwarding ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI… [email protected]
command="/path/to/your/script.sh",no-port-forwarding,no-pty,no-user-rc,no-agent-forwarding ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI… [email protected]
command="/path/to/your/script.sh",no-port-forwarding,no-pty,no-user-rc,no-agent-forwarding ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI… [email protected]
AllowGroups ops developers
AllowGroups ops developers
AllowGroups ops developers
PermitRootLogin no
PermitRootLogin no
PermitRootLogin no
Port 2222 # Select a port not in common use
Port 2222 # Select a port not in common use
Port 2222 # Select a port not in common use
ssh -p 2222 user@your_server_ip
ssh -p 2222 user@your_server_ip
ssh -p 2222 user@your_server_ip
X11Forwarding no
X11Forwarding no
X11Forwarding no
MaxAuthTries 3
MaxSessions 2
MaxAuthTries 3
MaxSessions 2
MaxAuthTries 3
MaxSessions 2
ClientAliveInterval 300 # Send a keepalive signal every 300 seconds (5 minutes)
ClientAliveCountMax 3 # Disconnect after 3 missed keepalives (effectively 15 minutes of inactivity)
ClientAliveInterval 300 # Send a keepalive signal every 300 seconds (5 minutes)
ClientAliveCountMax 3 # Disconnect after 3 missed keepalives (effectively 15 minutes of inactivity)
ClientAliveInterval 300 # Send a keepalive signal every 300 seconds (5 minutes)
ClientAliveCountMax 3 # Disconnect after 3 missed keepalives (effectively 15 minutes of inactivity)
LogLevel VERBOSE
LogLevel VERBOSE
LogLevel VERBOSE
sudo apt update && sudo apt install fail2ban # For Debian/Ubuntu
sudo yum install epel-release && sudo yum install fail2ban # For CentOS/RHEL
sudo apt update && sudo apt install fail2ban # For Debian/Ubuntu
sudo yum install epel-release && sudo yum install fail2ban # For CentOS/RHEL
sudo apt update && sudo apt install fail2ban # For Debian/Ubuntu
sudo yum install epel-release && sudo yum install fail2ban # For CentOS/RHEL