Hi,
Here’s an example for the console and SSH:
Configuring Cisco router for the first time
Here’s an example to enable telnet server on your router or switch:
R1(config)#line vty 0 4
R1(config-line)#transport input telnet
R1(config-line)#password cisco123
R1(config-line)#transport input
R1(config-line)#login
The configuration above will only ask for the password (cisco123). It’s also possible to use usernames/passwords instead:
R1(config)#username admin password cisco123
R1(config)#line vty 0 4
R1(config-line)#login local
And you can protect it with an access-list:
R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255
R1(config)#line vty 0 4
R1(config-line)#access-class 1 in
Hope this helps.
Rene