Outils pour utilisateurs

Outils du site


tech:notes_serveur_ssh_openssh_sshd_config

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:notes_serveur_ssh_openssh_sshd_config [2025/11/09 18:50] Jean-Baptistetech:notes_serveur_ssh_openssh_sshd_config [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon SSH Sécurité Réseau}}
 +
 +# Notes serveur ssh openssh sshd config
 +
 +
 +## ssh Autoriser que les connexions en root depuis seulement un ou deux serveurs de rebond
 +
 +~~~bash
 +sed -i.bak -e 's/^PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
 +cat <<EOF >>/etc/ssh/sshd_config
 +Match Address 192.168.1.32,192.168.1.15
 +        PermitRootLogin yes
 +EOF
 +
 +service ssh restart
 +~~~
 +
 +Notes : 
 +Il est aussi possible d'utilisaser la notation CIDR :
 +
 +`/etc/ssh/sshd_config`
 +~~~
 +Match Address 192.0.2.128/25,10.10.10.32/27
 +~~~
 +
 +Voir [[https://raymii.org/s/tutorials/Limit_access_to_openssh_features_with_the_Match_keyword.html]]
 +
 +
 +## Autres
 +
 +~~~
 +# Example of overriding settings on a per-user basis
 +#Match User anoncvs
 +#       X11Forwarding no
 +#       AllowTcpForwarding no
 +#       PermitTTY no
 +#       ForceCommand cvs server
 +~~~
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki