Bootstrap FreeKB - Configure a Cisco switch or router to allow SSH connections using IOS
Configure a Cisco switch or router to allow SSH connections using IOS

Updated:

Before configuring SSH, the switch our router needs to have the following:

 

Follow these directions to configure a Cisco switch or router to allow SSH connections using IOS.

  1. In IOS, type enable and press enter
  2. Type configure terminal and press enter
  3. Type line vty 0 4 and press enter
  4. Type transport input ssh and press enter

Note: Telnet could also be enabled, but this is typically avoided, because Telnet is cleartext (example: transport input telnet)

  1. Type login local and press enter
  2. Type exit and press enter

To test the SSH connection, using another Cisco router or switch, issue the following command to make the connection to the switch or router that has been configured to accept SSH connections. Replace username and IP address with the username and IP address of the remote router or switch.

ssh -l username 192.168.0.1

The reload command can be used to return the switch to the configuration it had before any changes were made.

To ensure these changes remain saved if the switch is restarted, save the changes to the startup-config. Type copy running-config startup-config and press enter. This saves to NVRAM. To ensure the startup-config contains the new config, use the show startup-config command. It is also possible to save the changes to flash using the copy startup-config flash command. Then use the show flash command, and the startup-config file should be listed.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 3b6b6f in the box below so that we can be sure you are a human.