๐Ÿ” SSH Configuration with RADIUS Authentication (Cisco)

๐Ÿงฉ Topology


1๏ธโƒฃ Basic Device & SSH Setup (Mandatory)

hostname R1
ip domain-name lab.local

crypto key generate rsa modulus 2048
ip ssh version 2
ip ssh time-out 60
ip ssh authentication-retries 3


2๏ธโƒฃ Create Local Fallback User (IMPORTANT)

Used when RADIUS server is unreachable.

username localadmin privilege 15 secret L0cal@123


3๏ธโƒฃ Enable AAA

aaa new-model


4๏ธโƒฃ Configure RADIUS Server

๐Ÿ”น IOS / IOS-XE (Classic Method)

radius server RAD1
 address ipv4 192.168.10.50 auth-port 1812 acct-port 1813
 key Radius@123

(Older IOS alternative)

radius-server host 192.168.10.50 key Radius@123


5๏ธโƒฃ Create AAA Method Lists (Best Practice)

aaa authentication login SSH_AUTH group radius local
aaa authorization exec SSH_AUTH group radius local
aaa accounting exec default start-stop group radius

Explanation:


6๏ธโƒฃ Apply AAA to VTY Lines (SSH Only)

line vty 0 4
 transport input ssh
 login authentication SSH_AUTH
 authorization exec SSH_AUTH
 exec-timeout 10 0

โœ” SSH only
โœ” No Telnet
โœ” Timeout protection


7๏ธโƒฃ Restrict SSH Access with ACL (Highly Recommended)

ip access-list standard MGMT-ACL
 permit 192.168.10.0 0.0.0.255
 deny any log

line vty 0 4
 access-class MGMT-ACL in


8๏ธโƒฃ Privilege Level from RADIUS (Critical for Admin Access)

On RADIUS Server

Return attribute:

Cisco-AVPair = shell:priv-lvl=15

โœ” Gives full admin access
โœ” Without this, user gets privilege 1


9๏ธโƒฃ Verification & Troubleshooting

๐Ÿ” Check AAA & RADIUS

show aaa servers
show radius statistics
show run | section aaa

๐Ÿ” Check SSH

show ip ssh
show users

๐Ÿงช Debug (Use Carefully)

debug aaa authentication
debug radius authentication

Disable after testing:

undebug all


๐Ÿ” Authentication Flow (Important Concept)

SSH Login
   โ†“
AAA Method List
   โ†“
RADIUS Server
   โ†“
Privilege from RADIUS
   โ†“
Fallback to Local (if RADIUS fails)


โš ๏ธ Common Mistakes

โŒ Forgot local fallback user
โŒ RADIUS secret mismatch
โŒ No privilege attribute โ†’ user stuck at level 1
โŒ Telnet still enabled
โŒ ACL blocking RADIUS traffic


๐Ÿง  CCNA / CCNP / Interview Tips


โœ… Minimal Working Config (Quick Paste)

aaa new-model
username localadmin privilege 15 secret L0cal@123

radius server RAD1
 address ipv4 192.168.10.50 auth-port 1812 acct-port 1813
 key Radius@123

aaa authentication login SSH_AUTH group radius local
aaa authorization exec SSH_AUTH group radius local

ip domain-name lab.local
crypto key generate rsa modulus 2048
ip ssh version 2

line vty 0 4
 transport input ssh
 login authentication SSH_AUTH
 authorization exec SSH_AUTH
renjithbs Avatar

Posted by

Leave a comment