Thursday, May 7, 2009

How to enable ssh on cisco routers and procurve switches

Cisco Switch with CatOS
set crypto key rsa 1024
set ip permit 10.0.0.0 255.255.255.0
set ip permit enable ssh
show ip permit
write memory

Cisco Router or Switch with IOS
hostname myrouter
ip domain-name vandeplas.lab
!--- generate the rsa keygen
cry key generate rsa
!--- allow authentication using local aaa username chri password myVerySecurePassword
!--- Use SSH v2 as v1 is insecure
ip ssh version 2
ip ssh time-out 60
ip ssh authentication-retries 2
!--- Prevent non-SSH connections
transport input ssh
write memory

Cisco PIX/ASA
hostname mypix
domain-name vandeplas.lab
!--- generate the rsa key
ca generate rsa key 1024
!--- or on newer versions
crypto key generate rsa modulus 1024
!--- don't forget to save the crypto key into the memory ca save all
!--- allow ssh from the network 10.0.0.0/24 on the inside interface ssh 10.0.0.0 255.255.255.0 inside
!--- allow authentication using local aaa username chri password myVerySecurePassword aaa authentication ssh console LOCAL
!--- save the running-config
write memory

HP Procurve Switch
crypto key generate
ip ssh version 2
ip ssh
write memory

No comments:

Post a Comment