Question: why line vty 0 4?
Answer: VTY is a virtual port and used to get Telnet or SSH access to the device. ... The abstract “0 – 4” means that the device can allow 5 simultaneous virtual connections which may be Telnet or SSH. In a way, we may say that 5 (0 – 4) are connection ports to the Router or Switch.