Lab 1.1: Device Hardening and Secure Remote Access
Configure initial device security, console access, local credentials, and SSHv2 on Cisco IOS.
Built Oct 14, 2026CCNACisco IOSSSHSecurityFundamentals
Lab objectives
- Configure hostnames and privileged EXEC passwords.
- Configure legal warning banners on login.
- Secure console and VTY lines with timeout limits.
- Generate RSA keys and enable SSHv2.
- Test remote access from a management workstation.
Topology
The topology models a direct point-to-point management access segment. A management workstation (Admin-PC) connects directly to Switch-1 over an access link:
Admin-PC
192.168.1.50host
NICGi0/1
VLAN 1
access
Switch-1
switch192.168.1.2
Addressing table
| Device | Interface | IP Address | Subnet Mask | Default Gateway |
|---|---|---|---|---|
Switch-1 | Vlan1 | 192.168.1.2 | 255.255.255.0 | 192.168.1.1 |
Admin-PC | NIC | 192.168.1.50 | 255.255.255.0 | 192.168.1.1 |
Task 1: Configure basic system settings
Access the CLI of Switch-1 through the console connection.
- Enter privileged EXEC mode.
- Enter global configuration mode.
- Configure the device hostname as
SW1. - Configure an encrypted privileged EXEC password.
- Encrypt all plain text passwords in the configuration.
- Configure a login banner to warn unauthorized users.
bash
enable
configure terminal
hostname SW1
enable secret Cisco12345!
service password-encryption
banner motd # AUTHORIZED ACCESS ONLY. VIOLATORS WILL BE PROSECUTED. #Task 2: Harden console and terminal lines
Configure the console port to prevent brute-force attacks and session hijacking.
- Enter console line configuration mode.
- Configure a local console password.
- Enable password checking at login.
- Set an inactivity timeout of 5 minutes.
- Enable synchronous logging to prevent output interruptions.
bash
line console 0
password ConsolePass123!
login
exec-timeout 5 0
logging synchronous
exitTask 3: Configure secure management interface (SVI)
Configure Vlan1 to enable IP reachability for management traffic.
- Enter interface configuration mode for
Vlan1. - Assign the IP address
192.168.1.2with subnet mask255.255.255.0. - Activate the interface.
- Set the default gateway to
192.168.1.1.
bash
interface Vlan1
ip address 192.168.1.2 255.255.255.0
no shutdown
exit
ip default-gateway 192.168.1.1Task 4: Configure SSHv2 and local authentication
Disable insecure Telnet access and force SSHv2 encryption.
- Configure the IP domain name as
lab.local. - Create a local administrator account with privilege level 15.
- Generate RSA cryptographic keys with a 2048-bit modulus.
- Set the SSH version to 2.
- Configure lines
vty 0 15to require SSH and local login credentials. - Set the VTY inactivity timeout to 5 minutes.
bash
ip domain-name lab.local
username admin privilege 15 secret AdminSSH2026!
crypto key generate rsa modulus 2048
ip ssh version 2
line vty 0 15
transport input ssh
login local
exec-timeout 5 0
logging synchronous
exitTask 5: Verify configurations and test connectivity
- Save the running configuration to the startup configuration.
- Open the command prompt on
Admin-PC. - Test network layer reachability with a ping command.
- Initiate an SSH session to
192.168.1.2. - Authenticate with username
adminand passwordAdminSSH2026!.
text
PC> ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time<1ms TTL=255
Reply from 192.168.1.2: bytes=32 time<1ms TTL=255
PC> ssh -l admin 192.168.1.2
Open SSH to 192.168.1.2
Password:
SW1#Task 6: Verification checklist
Run the following commands on SW1 to verify configuration integrity:
bash
show ip interface brief
show ip ssh
show line vty 0 15
show running-config | section lineValidate expected output for SSH:
text
SW1# show ip ssh
SSH Enabled - version 2.0
Authentication timeout: 120 secs; Authentication retries: 3
Comments