SSH

SSH s'impose comme service essentiel pour pouvoir administrer le serveur à distance.

OPENSSH 9.2

1$ sshd -V
2OpenSSH_9.2, OpenSSL 3.0.17 1 Jul 2025

Ma config :

  • Clé RSA obligatoire
  • Pas de mot de passe
  • Sauf en local...
 1Port 22
 2
 3SyslogFacility AUTHPRIV
 4LogLevel VERBOSE
 5
 6LoginGraceTime 10
 7MaxAuthTries 3
 8MaxSessions 2
 9
10PubkeyAuthentication yes
11PasswordAuthentication no
12PermitEmptyPasswords no
13
14KbdInteractiveAuthentication no
15
16UsePAM yes
17
18AllowAgentForwarding no
19AllowTcpForwarding no
20X11Forwarding no
21TCPKeepAlive no
22Compression no
23ClientAliveCountMax 2
24
25Banner /etc/banner
26PrintMotd no
27PrintLastLog yes
28
29AcceptEnv LANG LC_*
30
31Subsystem       sftp    /usr/lib/openssh/sftp-server
32
33Match User totoiste Address 192.168.1.0/24
34        PasswordAuthentication yes
35        X11Forwarding yes
36        AllowTcpForwarding yes
37        PermitTTY yes

Rappel pour générer ses clés

👉 Manuel

Commande simple : $ ssh-keygen -t ed25519