Scenario

A new router has just been unboxed. It is called Router, has the management address 10.5.1.1/24 and accepts Telnet on its VTY lines with a shared password. Telnet sends everything in clear text, so you must switch the router to SSH only: the name R1, a domain, an RSA key, a local administrator account and VTY lines that accept only SSH and ask for that account. The password you choose for this lab is fictional and is never stored.

Topology

Router

Requirements

  1. 1The hostname is R1
  2. 2The domain name is lab.example.com
  3. 3An RSA key of at least 2048 bits exists
  4. 4A local user admin exists, protected with a secret
  5. 5SSH version 2 is enforced
  6. 6VTY lines 0 to 4 accept only SSH and authenticate with the local users

The router is called Router and accepts Telnet. Type ? for the commands you can use. Start with: enable

Router> show running-config

CCNA lab · about 12 min

Secure remote access with SSH

Replace Telnet with SSH on a router: name the device, set a domain, generate the keys, create a local user and allow only SSH on the VTY lines.

This lab is included in the CCNA plans and in the free trial.

Start the free trial Try the free VLAN lab Today's free lab

All labs

About this lab

A new router has just been unboxed. It is called Router, has the management address 10.5.1.1/24 and accepts Telnet on its VTY lines with a shared password. Telnet sends everything in clear text, so you must switch the router to SSH only: the name R1, a domain, an RSA key, a local administrator account and VTY lines that accept only SSH and ask for that account. The password you choose for this lab is fictional and is never stored.

About 12 minutes. Included in the CCNA plans and the free trial.

Questions about this lab

Is this a real Cisco router?

No. It is a small simulator written by CertAce. It understands a handful of commands and keeps the state of one router, so you can practise the ideas without lab gear. Real devices print more, and the exam may ask for things this lab does not cover. CertAce is not affiliated with Cisco.

Why is Telnet considered unsafe?

It sends the username, the password and every command in clear text. Anyone who can capture the traffic can read them. SSH encrypts the session and authenticates the server with its key.

What is the difference between password and secret?

A password is stored readable (or with a weak reversible encoding). A secret is stored as a hash that cannot be reversed. For both enable access and users, use secret.

Why are the VTY lines numbered 0 4?

The router allows five simultaneous remote sessions on lines vty 0 to 4. Some platforms offer more (vty 0 15). Each line needs the same transport and login configuration.

CertAce is not affiliated with or endorsed by Cisco Systems. CCNA and Cisco are trademarks of Cisco Systems, Inc. The simulator and every command output here were written by CertAce.