router (config)# service password-encryption

router (config)# username < username > privilege 15 password < password >

router (config)# exit

router (config)# crypto key generate rsa


% please define a domain-name firts


router (config)# domain < domain >

router (config-domain)# exit

router (config)# ip domain-name < domain-name >   # hostname.domain


router (config)# crypto key generate rsa


the name of the keys will be: < domain-name>

choose the size of the key modules in the range of 360 to 4096 for your General Purpose Keys. Choosing a key modules greater than 512 may take a few minutes


how many bits in the modules [512]:2048


% generate 2048 bit RSA keys, keys will be non-exportable...

[OK] (elapsed time was 1 seconds)

% SSH-5-ENABLED:SSH 1.99 has been enables


router (config)# line vty 0 4

router (config)# login local

router (config)# transport input ssh