The key value can be specified as is in the hexadecimal form. If an ASCII string is used for the key value, perpend ``s:'' to the key. To change a key other than the current key, prepend ``[index]'' to the key value, where index is the number of the key you wish to change. To select which key is active, use ``[index]'' without supplying any keys, where index is the desired key number. Including the keywords open or restricted changes the authentication mode between open authentication and restricted authentication. Use the off keyword to disable WEP.
Example:The following command sets the default key to be key 3:myprompt# iwconfig ath0 key [3]The following command sets the default key to be the hex key 0xDEAD-BEEF-AA:myprompt# iwconfig ath0 key DEAD-BEEF-AAThe following command sets key 2 to the ASCII phrase ``password'' and sets the authentication type to open:myprompt# iwconfig ath0 key [2] s:password openThe following command disables WEP:myprompt# iwconfig ath0 key off