SNMPKEY(1)
snmpkey(1) π
okay bestie, meet snmpkey(1) β it's chilling in the User Contributed Perl Documentation section, and it's the little utility that makes SNMPv3 keys for the Net::SNMP module. no cap, it's giving security-sidekick energy. πβ¨
πΈ NAME πΈ
snmpkey β create SNMPv3 security keys for the Net::SNMP module. literally its whole job. π
β¨ USAGE β¨
so the snmpkey utility spits out security keys based on a password plus an authoritativeEngineID that you hand it on the command line. then Net::SNMP can use that localized key instead of the plain text password when you're creating SNMPv3 objects. iconic behavior, honestly. π«Ά
snmpkey <authProto> <password> <authEngineID> [<privProto> [<password>]]
π¦ DESCRIPTION π¦
k so the User-based Security Model that SNMPv3 uses defines an algorithm that "localizes" a plain text password to one specific authoritativeEngineID using a one-way hash. the resulting key is what the SNMP application uses instead of the plain text password, for security reasons. yes ma'am. π₯
Net::SNMP lets you give the object constructor either a plain text password or a localized key when you're configuring authentication or privacy. the snmpkey utility exists to generate that key for the -authkey or -privkey named arguments when you pass them to the Net::SNMP session() constructor. iykyk. π
π REQUIRED ARGUMENTS π
the snmpkey utility requires at least three command line arguments. yes, at least three β the section title is doing the most, but the last two are optional. plot twist. π
- the first argument defines which hash algorithm to use when creating the authKey. you can specify either HMAC-MD5-96 or HMAC-SHA-96 with the string
'md5'or'sha'respectively. this choice must match the algorithm you pass to the-authprotocolargument when creating theNet::SNMPobject. matchy-matchy, or it's not gonna slay. π - the second argument is the plain text password that gets localized to create the authKey. that's the secret sauce. π
- the third required argument is the authoritativeEngineID of the remote SNMP engine associated with the
Net::SNMPargument-hostname. enter it as a hexadecimal string10to64characters (5to32octets) long, and you can prefix it with an optional"0x". hex girl summer. π
the last two arguments are optional and control how the privKey gets generated:
- by default, the fourth argument assumes a value of
'des', which corresponds to the default privacy protocol defined in the User-based Security Model. theNet::SNMPmodule supports CBC-3DES-EDE and CFB128-AES-128 as alternatives to the default protocol CBC-DES. choose them by specifying the string'3des'or'aes'respectively. this choice must match the protocol passed to the-privprotocolargument when creating theNet::SNMPobject. π - the last argument can specify the plain text password that gets localized to create the privKey. if you don't specify this argument, the authKey password is used. recycling, but make it cryptography. β»οΈβ¨
π AUTHOR π
David M. Town <dtown@cpan.org> β the main character who wrote this. π
π LICENSE AND COPYRIGHT π
Copyright (c) 2001-2009 David M. Town. All rights reserved.
This program is free software; you may redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so yes, you can share it, remix it, and keep it cute, as long as you follow those Perl 5 terms. π«Ά
π SEE ALSO π
Net::SNMP
and that's the whole vibe check, bestie: this page comes from perl v5.42.0, dated 2012-10-15, and it's living under SNMPKEY(1). go localize those keys and absolutely devour. periodt. ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Net-SNMP 6.0.1-160000.2.2 Β· GPL-1.0+ or Artistic-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms