In this post I will configure all my VTY (Telnet ports) to have logging synchronous and a 30 minute exec timeout (max idle time). I give the ports a password of cisco, configure the switch to require a login on the VTY ports and display the motd banner.   Finally I use a show command to check the running config.
switch1#conf t        
switch1(config)#line vty 0 15
switch1(config-line)#logging synchronous 
switch1(config-line)#exec-timeout 30 0
switch1(config-line)#password cisco
switch1(config-line)#login
switch1(config-line)#motd-banner 
switch1(config-line)#end
switch1#sh run | begin line vty
line vty 0 4
 exec-timeout 30 0
 password 7 01100F175804
 logging synchronous
 login
line vty 5 15
 exec-timeout 30 0
 password 7 01100F175804
 logging synchronous
 login
!
end
 
