This is with normal “Username/Password” authentication. Apparently IOS 15 and up supports public/private key authentication…





1
2
Router(config)#hostname myhostname
myhostname(config)#ip domain-name mydomain

This must be a modulus of 1024 and higher else only SSH version 1 can be enabled:

1
myhostname(config)#crypto key generate rsa modulus 1024
1
2
3
4
5
6
7
8
myhostname(config)#ip ssh time-out 120
myhostname(config)# ip ssh authetication-retries 3    
myhostname(config)# ip ssh port 1234    
myhostname(config)#ip ssh version 2    
myhostname(config)#username myusername secret mypassword    
myhostname(config)#line vty 0 4    
myhostname(config)# transport input ssh    
myhostname(config-line)#login local

Verify the configuration:

1
myhostname(config)#show ip ssh

…and remember to save the changes!

Comments