Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Blue

SSH: Protocol error: expected packet type 50, got -1

I see this error during one of many automated script activities:

Received disconnect from [IOS router IP addr]: 2: Protocol error: expected packet type 50, got -1

Just curious what could've caused this.

2 REPLIES
Cisco Employee

Re: SSH: Protocol error: expected packet type 50, got -1

Most likely the router disconnected unexpectedly. Packet 50 (in SSHv2) is SSH2_MSG_USERAUTH_REQUEST, meaning request for user authentication. Sometimes, if the credentials are wrong, IOS immediately disconnects instead of letting you try again.

We see this with RME when DCR has bad credentials for certain devices (typically autonomous APs).

Blue

Re: SSH: Protocol error: expected packet type 50, got -1

In my case, it appears it's because the further-down-the-list target hosts of many simultaneously spawned SSH sessions have timed out waiting for user input (such as entering a password), but SSH doesn't actually disconnect (packet type -1) until the "user" has gotten around to sending that input. It particularly manifests itself with any OS using a relatively short SSH timeout value--I have to set Expect timeout to the smallest value possible, in order to process through a full list of not that many Aruba hosts, in parallel, without getting disconnected by the ones at the end of the list. It's not as obvious with IOS, presumably due to a longer timeout value.

4809
Views
0
Helpful
2
Replies
CreatePlease to create content