Skip to content

Instantly share code, notes, and snippets.

@Razuuu
Created March 20, 2026 20:39
Show Gist options
  • Select an option

  • Save Razuuu/4ee245b80719a12bae1f51018b35e152 to your computer and use it in GitHub Desktop.

Select an option

Save Razuuu/4ee245b80719a12bae1f51018b35e152 to your computer and use it in GitHub Desktop.
SSH Custom
# Only allow user <user>
AllowUsers <user>
# Auth global
PasswordAuthentication no
PubkeyAuthentication yes
PermitRootLogin no
# Localnets access
Match Address 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.1/32
AllowUsers root <user>
PermitRootLogin prohibit-password
PasswordAuthentication no
PubkeyAuthentication yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment