Generating of the SSH keys and the SSL keys will each take some time. It will work better if there is a brief pause between the two.
en conf t hostname SWITCH-NAME enable super-user-password PASSWORD enable port-config-password PASSWORD enable read-only-password PASSWORD username admin password PASSWORD username admin2 password PASSWORD aaa authen web-server default local aaa authen login default local aaa authentication enable default local enable aaa console crypto key generate rsa modulus 2048 ! wait for key to finish generating no telnet server crypto-ssl certificate generate ip ssh idle-time 30 no web-management http web-management https web-management session-timeout 1800 console timeout 30 cdp run fdp run lldp run logging console wr me