Monday, November 9, 2026

Cisco || SSH Version 2 Configuration on Cisco Router & Switch

SSH (Secure Shell) is a cryptographic protocol operating on port 22 that provides secure remote access and file transfers, serving as a safe replacement for unencrypted protocols like Telnet and FTP. SSH Version 2 enhances security and efficiency over Version 1 by incorporating robust encryption and features like SFTP.

Overview: SSH Version 1 vs. SSH Version 2

SSH Version 1:
Transport Security & Features: Basic host-to-host and user authentication over an encrypted channel.
Standard Port: 22/TCP

SSH Version 2:
Transport Security & Features: Enhanced cryptographic algorithms, higher efficiency, and integrated SFTP support.
Standard Port: 22/TCP

Step 1: Prerequisites & Host Identity

Set a unique hostname and domain name (required to generate RSA crypto keys):

Router> enable
Router# configure terminal
Router(config)# hostname Core-Router
Core-Router(config)# ip domain-name company.local

Step 2:

Generate RSA key to be used.

ip ssh rsa keypair-name sshkey
Enables the SSH server for local and remote authentication on the router. For SSH Version 2, the modulus size must be at least 1024 bits.
crypto key generate rsa usage-keys label sshkey modulus 1024

Configures SSH control variables on the Router.

ip ssh timeout 120

Configure SSH version 2 (This will disable SSH version 1)

ip ssh version 2

Step 3:

Enable SSH transport support for the virtual type terminal (vty)

line vty 0 4
transport input SSH

Commands to Verify SSH Configuration
show ssh
how ip ssh
debug ip ssh