SSH: Protocol error: expected packet type 50, got -1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2009 04:28 PM
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.
- Labels:
-
Network Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2009 04:31 PM
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2009 07:36 AM
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.
