Cisco製品を利用するうえで、パスワード管理の方法で推奨となるやり方がありましたので、簡単にメモしておきます。
参考URL
https://www.cisco.com/c/ja_jp/support/docs/ip/access-lists/13608-21.html#anc14
パスワード管理
ローカル(機器内)でのパスワード管理についてのメモです。
「password」系コマンドは使わない
下記のような方法で、パスワードを設定することもあるかと思いますが、現在では、非推奨な方法です。
Switch(config)#service password-encryption Switch(config)#line console 0 Switch(config-line)#password xxxx Switch(config-line)#login Switch(config-line)#exit Switch(config)#line vty 0 15 Switch(config-line)#password xxxx Switch(config-line)#login Switch(config-line)#exit
「secret」系コマンドを使う
パスワードの設定を行なうには、「enable secret」と「拡張パスワード セキュリティ機能」を使用します。これは、パスワードのハッシングにMD5を使用しています。
Switch(config)#username admin secret xxxx Switch(config)#line console 0 Switch(config-line)#login local Switch(config-line)#exit Switch(config)#line vty 0 15 Switch(config-line)#login local Switch(config-line)#exit Switch(config)#hostname SW1 SW1(config)#ip domain-name orangetakam.local SW1(config)#crypto key generate rsa The name for the keys will be: SW1.orangetakam.local Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus [512]: 2048 % Generating 2048 bit RSA keys, keys will be non-exportable...[OK] SW1(config)#ip ssh version 2