How to Configure SSH on a Cisco Switch?
Telnet is a widely used protocol for accessing and administering Cisco devices. But this protocol is not exactly secure and transmits data over a network in plain text.
SSH is a secure protocol and it’s best practice to secure your access to all devices. Configuring SSH on most Cisco switch models is a straightforward process. You will need to generate a key and it is recommended to enable the aaa (Authentication, Authorization and Accounting) model.
Here are the steps:
Switch# config t
Switch(config)# ip domain-name demo.net
Switch(config)# crypto key generate rsa
At this point, you will be prompted to enter a modulus number for the key generation:
Switch(config)# username admin privilege 15 secret ‘password’ (you could create more usernames)
Switch(config)# aaa new model (To enable the aaa model on the switch)
Switch(config)# line vty 0 15
Switch(config-line)# transport input ssh
Switch(config-line)# no password
Switch(config-line)# transport preferred ssh
Switch(config-line)# exit
Switch(config)# exit
Switch# copy run start (To save the configuration changes)
After these steps, the cisco device could be access using tools such as Putty, Cygwin. Cygwin could also be configured to integrate with your PowerShell interface and save you the time involved in switching between shells. You could also configure the Start-Transcript cmdlet in your PowerShell profile to keep a log of your commands if necessary.
No comments:
Post a Comment