To set up secure access to a router through a connection to the console interface, you can use the following three commands:
line console 0
password cisco
login
line console 0: This command is used to access the console line configuration mode, where you can configure settings for the console port.
password cisco: This command sets a password (in this case, "cisco") for the console line, providing a basic level of security.
login: This command is used to enable the login requirement on the console line, ensuring that users must enter a valid password to access the router through the console port.