Aller au contenu

SNMP v3

Installation

Bash
apt update && apt install snmpd -y

Configuration

Bash
nano /etc/snmp/snmpd.conf

Décommenter la ligne :

Text Only
agentaddress udp:161,udp6:[::]:161

Redémarrer le service

Bash
systemctl restart snmpd

Activer le service au démarrage

Bash
systemctl enable snmpd --now

Créer un utilisateur

Prérequis

Bash
apt update && apt install libsnmp-dev -y

Stopper le service

Bash
systemctl stop snmpd

a

Bash
cp /usr/bin/net-snmp-create-v3-user ~/
sed -ie '/prefix=/adatarootdir=${prefix}\/share' /usr/bin/net-snmp-create-v3-user

Utilisateur

Bash
net-snmp-config --create-snmpv3-user -a SHA-512 -x AES -ro

Démarrer le service

Bash
systemctl start snmpd