SSH (Secure Shell) is a secure method of remotely accessing and managing network devices. Unlike Telnet, which transmits data in plaintext, SSH encrypts communication, enhancing security.
Step 1: GNS3 Topology Setup
Before configuring SSH, we need a basic network topology in GNS3.
SSH requires RSA key pairs for secure communication. Generate a key of at least 1024 bits.
R1(config)#crypto key generate rsa
The name for the keys will be: R1.nerd-cafe.ir
Choose the size of the key modulus in the range of 360 to 4096 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 8 seconds)
R1(config)#
Use at least 1024 bits for security; 2048 bits is recommended for strong encryption.
3. Create a Local User Account for SSH Access
Define a username and password for SSH authentication.
PC1> ip 192.168.202.11/24 192.168.202.1
Checking for duplicate address...
PC1 : 192.168.202.11 255.255.255.0 gateway 192.168.202.1
PC1> show ip
NAME : PC1[1]
IP/MASK : 192.168.202.11/24
GATEWAY : 192.168.202.1
DNS :
MAC : 00:50:79:66:68:00
LPORT : 20006
RHOST:PORT : 127.0.0.1:20007
MTU : 1500
PC1> save
Saving startup configuration to startup.vpc
. done
PC1>
2. Connect via SSH Using a Terminal Emulator
Use PuTTY, SecureCRT, or the built-in SSH client in Linux/macOS.