.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "SNMPKEY 1" .TH SNMPKEY 1 2025-12-14 "perl v5.42.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME snmpkey \- Create SNMPv3 security keys for the Net::SNMP module .SH USAGE .IX Header "USAGE" The \f(CW\*(C`snmpkey\*(C'\fR utility generates security keys based on a password and an authoritativeEngineID passed on the command line. This key can then be used by the Net::SNMP module instead of the plain text password when creating SNMPv3 objects. .PP .Vb 1 \& snmpkey [ []] .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The User\-based Security Model used by SNMPv3 defines an algorithm which "localizes" a plain text password to a specific authoritativeEngineID using a one\-way hash. This resulting key is used by the SNMP application instead of the plain text password for security reasons. .PP The Net::SNMP module allows the user to either provide a plain text password or a localized key to the object constructor when configuring authentication or privacy. The \f(CW\*(C`snmpkey\*(C'\fR utility can be used to generate the key to be used by the \fB\-authkey\fR or \fB\-privkey\fR named arguments when they are passed to the Net::SNMP \f(CWsession()\fR constructor. .SH "REQUIRED ARGUMENTS" .IX Header "REQUIRED ARGUMENTS" The \f(CW\*(C`snmpkey\*(C'\fR utility requires at least three command line arguments. The first argument defines which hash algorithm to use when creating the authKey. Either HMAC\-MD5\-96 or HMAC\-SHA\-96 can be specified with the string \*(Aqmd5\*(Aq or \&\*(Aqsha\*(Aq respectively. This choice must match the algorithm passed to the \&\fB\-authprotocol\fR argument when creating the Net::SNMP object. The second argument is the plain text password that is to be localized to create the authKey. The third required argument is the authoritativeEngineID of the remote SNMP engine associated with the Net::SNMP argument \fB\-hostname\fR. The authoritativeEngineID is to be entered as a hexadecimal string 10 to 64 characters (5 to 32 octets) long and can be prefixed with an optional "0x". .PP The last two arguments are optional and can be used to determine how the privKey will be generated. By default, the fourth argument assumes a value of \*(Aqdes\*(Aq corresponding to the default privacy protocol defined in the User\-based Security Model. The Net::SNMP module supports CBC\-3DES\-EDE and CFB128\-AES\-128 as alternatives to the default protocol CBC\-DES. These protocols can be chosen by specifying the string \*(Aq3des\*(Aq or \*(Aqaes\*(Aq respectively. This choice must match the protocol passed to the \fB\-privprotocol\fR argument when creating the Net::SNMP object. The last argument can be used to specify the plain text password that is to be localized to create the privKey. If this argument is not specified, the authKey password is used. .SH AUTHOR .IX Header "AUTHOR" David M. Town .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (c) 2001\-2009 David M. Town. All rights reserved. .PP 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. .SH "SEE ALSO" .IX Header "SEE ALSO" Net::SNMP