os:linux:ssh
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| os:linux:ssh [2022/07/02 12:47] – [References] warnaud | os:linux:ssh [2024/02/20 11:51] (current) – [References] warnaud | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== SSH config ====== | ||
| + | <code bash> vi / | ||
| + | ====== Key only access ====== | ||
| + | ===== Root ===== | ||
| + | <code perl> | ||
| + | PermitRootLogin prohibit-password | ||
| + | </ | ||
| + | |||
| + | ===== User ===== | ||
| + | <code perl> | ||
| + | PasswordAuthentication no | ||
| + | RSAAuthentication yes | ||
| + | PubkeyAuthentication yes | ||
| + | </ | ||
| + | ===== Specific to user ===== | ||
| + | <code perl> | ||
| + | Match User alice, | ||
| + | PasswordAuthentication no | ||
| + | </ | ||
| + | ====== Deny User access ====== | ||
| + | <code perl> | ||
| + | DenyUsers johnd admin nagios | ||
| + | </ | ||
| + | ====== Deny Groups access ====== | ||
| + | <code perl> | ||
| + | DenyGroups wheel adm video apache | ||
| + | </ | ||
| + | ====== Deny User access ====== | ||
| + | <code perl> | ||
| + | Deny Users johnd admin nagios | ||
| + | </ | ||
| + | ====== Disable IPv6 ====== | ||
| + | |||
| + | <code perl> | ||
| + | Address Family inet | ||
| + | </ | ||
| + | ====== Set Modifications ====== | ||
| + | <code bash> systemctl restart sshd</ | ||
| + | ====== References ====== | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
