Geo Blocks SSH Logins even if the password is right when not in the right country
Find a file
2024-12-08 13:46:56 +01:00
readme.md Create readme.md 2024-12-08 13:46:56 +01:00
ssh-country-check Create ssh-country-check 2024-12-08 13:44:18 +01:00

To implement this:

  1. Save this script as "/usr/local/sbin/ssh-country-check" with your changed config

  2. Add this to /etc/ssh/sshd_config: ForceCommand /usr/local/sbin/ssh-country-check

  3. Make the script executable: chmod +x /usr/local/sbin/ssh-country-check

  4. Restart SSH service: systemctl restart sshd