Chapter 5 - Configuring and Encrypting Passwords on Cisco Routers and Switches

Other Cisco Other Cisco Material Original source

Configuring passwords on Cisco routers and switches

In this chapter, we will see how to configure passwords on Cisco routers and switches. Cisco devices have four types of passwords.

The "enable" command takes us into privileged mode. The "conf t" mode takes us into global configuration mode which pertains to the configuration settings of the whole switch. The "enable password" sets a password for the privileged mode. '123456' is the password. The "exit” command takes us out of the privileged mode. To see if a password has been set for the privileged mode, try entering into privileged mode by typing "en" command.

Encrypting passwords on Cisco routers and switches.

In the previous chapter, we have seen how to set passwords on Cisco switches or routers. Of course setting passwords does add to the security of the device but there is a small problem. The password is stored in plain text. Anyone who gets access to the switch can easily see all the passwords by typing command "show running-config or show startup-config". Today we will see how to encrypt passwords on Cisco routers and switches.

Encrypting passwords can further enhance the security of the device. Privileged password can be encrypted by using the command "enable secret" instead of "enable password". This command should be set from privileged global configuration mode.

Let's see what can we see when we use the command "show running-config".

We can see that the password we set has been encrypted, but what about other passwords. The console, auxiliary and vty lines passwords cannot be encrypted even if we use "enable secret" command. To encrypt those passwords, we have to use another command "service password-encryption" as shown below.

This command will encrypt all the passwords stored in plain text on the device.

← All Other Cisco articles Home