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

Let’s talk IT.

Request a consultation. Tell us where your offices are and one of our engineers will be in touch within one business day — no sales script, no obligation, just a working conversation about what you’re trying to do.

cyber insurance

"*" indicates required fields

This field is for validation purposes and should be left unchanged.
Your Name*