Sunday, April 11, 2010

Cisco, enable SSH server

This is with normal "Username/Password" authentication. Apparently IOS 15.0M and up is supporting public/private key authentication...
Router# show ip ssh   
Router(config)#hostname myhostname    
myhostname(config)#ip domain-name mydomain    
myhostname(config)#crypto key generate rsa modulus 2048    
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
...and remember to save your changes!