Outils pour utilisateurs

Outils du site


tech:notes_serveur_ssh_openssh_sshd_config

Ceci est une ancienne révision du document !


Notes serveur ssh openssh sshd config

ssh Autoriser que les connexions en root depuis seulement un ou deux serveurs de rebond

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
tech/notes_serveur_ssh_openssh_sshd_config.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki