Skip to main content

Cisco Device Kicks Users Out After Successful Authentication

By February 15, 2018September 18th, 2020Blog, Cisco, Networking
Cisco

Description:

Ever had an ssh session to a Cisco device close as soon as authenticating? This article describes one possible reason for this behavior.

No Exec

Assuming you have access to the device from the console or other method, login and check the VTY configuration for disabled exec. If logging into a user or admin exec level account if exec is disabled, you will unceremoniously be kicked out of your session with no warning or logging to indicate why.

Here is an example of a configuration where the first 4 ssh sessions will authenticate and drop to command prompt no problems, but all subsequent sessions will close after logging in:

line vty 0 4
 exec-timeout 120 0
 logging synchronous
 transport input ssh
line vty 5 15
 no exec
 exec-timeout 120 0
 logging synchronous
 transport input ssh
!

To fix this behavior simply run the following:

Pei-Hq-Core01(config)# line vty 5 15
Pei-Hq-Core01(config-line)#exec

Now the session will no longer close after logging in!

Max Fuller, PEI

Leave a Reply