02-26-2025 10:12 AM
Hello all,
I'm trying to understand the localizedv2key option when configuring the snmp-server user command, i.e. "when" should I use it, or "how" to even use it?
From my research, a "localized key" refers to a user's password being combined with the SNMP engineID of the switch, resulting in an aptly named "local key" for each switch while still allowing the user to use a single password for every switch.
What I'm struggling with is understanding how that concept is used in the snmp-server user command with the parameter localizedv2key . When using this parameter, is one supposed to enter a password in hex format (preceded with 0x, e.g. 0xabc123)? If so, how does one generate this hex representation of your password?
My initial attempt was to create an SNMP user TEST with password testing1 using localizedv2key (also, there is no existing local TEST user on the box, so show run | i TEST returns nothing).
To create this new SNMP user TEST with the localizedv2key parameter , I converted the user's password testing1 to hex (74657374696e6731), and then very crudely tried to enter it (preceded with 0x) in my snmp-server user command for both auth and priv but with no luck:
labnexus9ksw1(config)# snmp-server user TEST network-operator auth md5 0x74657374696e6731 priv 0x74657374696e6731 localizedv2key
decryptSalt for auth failed
warning: password for user:TEST not set. S/he may not be able to login
labnexus9ksw1(config)#
I feel like I'm missing something on what this localizedv2key parameter means, or when/how to use it? For example, how would I setup a user TEST with password testing1 using the localizedv2key parameter?
Solved! Go to Solution.
03-05-2025 01:51 AM
Hello @vv0bbLeS
The localizedv2key
option in the snmp-server user
command is indeed a bit tricky to understand and use. Let me break it down for you and clarify how it works, when to use it, and how to properly configure it.
localizedv2key
?The localizedv2key
option is used when you want to directly specify the localized key (in hexadecimal format) for the SNMPv3 user instead of providing a plaintext password. Normally, when you configure an SNMPv3 user with a password, the device takes that password and combines it with the SNMP engine ID to generate a localized key. This localized key is what is actually used for authentication and encryption.
The localizedv2key
option allows you to bypass the password-to-localized-key conversion process and directly provide the localized key in hexadecimal format. This is useful in scenarios where you already have the localized key (e.g., from another device or system) and want to use it directly.
localizedv2key
?You would use the localizedv2key
option in the following scenarios:
localizedv2key
.localizedv2key
to reapply the exact same keys.localizedv2key
?To use the localizedv2key
option, you need to:
snmp-server user
command with the localizedv2key
option and provide the localized key in hexadecimal format (prefixed with 0x
).Your attempt failed because you provided the plaintext password (testing1
) in hexadecimal format (74657374696e6731
) instead of the localized key. The localized key is not the same as the password in hexadecimal format—it is derived from the password and the SNMP engine ID.
HTH
AshSE
03-05-2025 01:51 AM
Hello @vv0bbLeS
The localizedv2key
option in the snmp-server user
command is indeed a bit tricky to understand and use. Let me break it down for you and clarify how it works, when to use it, and how to properly configure it.
localizedv2key
?The localizedv2key
option is used when you want to directly specify the localized key (in hexadecimal format) for the SNMPv3 user instead of providing a plaintext password. Normally, when you configure an SNMPv3 user with a password, the device takes that password and combines it with the SNMP engine ID to generate a localized key. This localized key is what is actually used for authentication and encryption.
The localizedv2key
option allows you to bypass the password-to-localized-key conversion process and directly provide the localized key in hexadecimal format. This is useful in scenarios where you already have the localized key (e.g., from another device or system) and want to use it directly.
localizedv2key
?You would use the localizedv2key
option in the following scenarios:
localizedv2key
.localizedv2key
to reapply the exact same keys.localizedv2key
?To use the localizedv2key
option, you need to:
snmp-server user
command with the localizedv2key
option and provide the localized key in hexadecimal format (prefixed with 0x
).Your attempt failed because you provided the plaintext password (testing1
) in hexadecimal format (74657374696e6731
) instead of the localized key. The localized key is not the same as the password in hexadecimal format—it is derived from the password and the SNMP engine ID.
HTH
AshSE
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide