Link to home
Create AccountLog in
Avatar of noad
noadFlag for United States of America

asked on

Setting a passwor don a Cisco Router

when I set a password in the "line con 0"

R1#enable
R1(config)# comp t
R1(config)# line con 0
R1(config-line)#password TEST
R1(config-line)#log in
R1(config-line)#^Z
R1#wr

1- I understand that the password is "TEST", but when I type in "log in" that is all right? I don't haev to type anything else, correct?
2- When you start to type the command it say end with CNTL/Z I see that at the end it's (^Z) dose the CNTL stand for ^???
3- At the end there is R1#wr, what is the WR for? is that to tell the router to write the config that you just made?
Avatar of Paul_W360
Paul_W360
Flag of Austria image

As con 0 is your Console-Port there normally is no login-authetification, just enable-password-protection.
But you can of course password-protect that line.
Do it like the following.

R1#enable
R1(config)#configure terminal
R1(config)#line con 0
R1(config-line)#password TEST123
R1(config-line)#login
R1(config-line)#exit
R1(config)#exit
R1#copy running-config startup-config

When i configured that, you will need to type in the password "TEST123" every time you try to access the Router CLI via Console Port. the "login" command tells the router wich Login-Credentials to use. If you just type "login" it will use the password locally configured in that line. (In this case "TEST123").
If you would have a table of different users on your Router, you could let them in with their user and password on that line by typing "login authentication local_auth".
The last line (wr - you can also do the same with "copy running-config startup-config") makes your changes permanent. If you dont execute that command after you have made changes to the config of your Router, the Changes will be lost after the next Reload/Restart of the Router, but if you type that command, it will load the config you just made also on next Reload.
Avatar of noad

ASKER

Great!
How about the  ending command (^Z) after log in what is that for? and exactly how do I put it in do I just do it inthe same way that I just did now or are you saying to just type exit instead of ^Z?


Thank you for your help...
Avatar of Don Johnston
^Z (control Z) is just a shortcut for the "end" command. It gets you out of config mode.
Avatar of noad

ASKER

ok,
So exit or ^Z they are both the same, correct?
In other words I can use one or the other
ASKER CERTIFIED SOLUTION
Avatar of lead-magnet
lead-magnet

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of noad

ASKER

Thank You both very much...