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