One of the operators has bruteforced HP ProCurve switch via SSH. I have connected to device via console cable and killed all SSH sessions. However, I can not still to connect to device via SSH. How can I resolve this problem without device reboot? Thank you.

[SSH] Logged in (password)

[SSH] ERROR: Received disconnect from port 22:11:
Sorry, the maximum number of sessions are active.  Try again later.

  • 2
    Are you sure that SSH port 22 is still open? – M. Rostami Dec 27 '19 at 16:07
  • 1
    Did you use kill <1-6>? Have you tried disabling and re-enabling ssh ([no] ip ssh)? You can also try setting the timeout to the lowest possible value (ip ssh timeout 5). – Zac67 Dec 27 '19 at 16:18
  • 2
    Change the SSH port to another. As an example, port number 8765. Try to connect this port as an SSH client. – M. Rostami Dec 27 '19 at 16:21
  • 1
    You really need to give use the (sanitized) device configuration so we can see what may be wrong. – Ron Maupin Dec 27 '19 at 19:36
  • 2
    There is a stale ssh connections. And because you probably didn't set timeout for that kind of sessions, they're will be opened forever. You can either connect via console and clean them or reload switch. – Andrey Prokhorov Dec 28 '19 at 13:10

Change SSH port to eg. 2222. Not 100% sure, but probably all current sessions will close/drop.

SSH key-based authentication can be leveraged to eliminate password brute force attempts. So that won't happen anymore, problem solved.

  • It is not help. :-( [SSH] Logged in (password) [SSH] ERROR: Received disconnect from port 2222:11: Sorry, the maximum number of sessions are active. Try again later. [SSH] INFO: DISCONNECT – Ruslan Dec 31 '19 at 8:51
  • If you have a web interface of your hosting you should change SSH port there. If SSH is the only way you can connect.. Bad luck. Keyboard & mouse... :( – l4jos Dec 31 '19 at 9:32
  • I changed the SSH port, but the same result. I can to connect via console port directly. Web interface has disabled for security. – Ruslan Jan 6 '20 at 18:28

I rebooted switch. SSH works now.

  • You might have caught a bug there, if neither killing all sessions, changing ports, de-/reactivating SSH, nor waiting for timeout helped. – Zac67 Jan 6 '20 at 18:46
  • @Zac67 The latest version of OS on switch. Probably need to downgrade... – Ruslan Jan 6 '20 at 21:09
  • 2
    It's doesn't need to be on that single version. I'd verify with HPE support. – Zac67 Jan 6 '20 at 21:40
  • What firmware were you running? I could try to replicate this issue to see if it's a firmware bug or something else. – Stuggi Feb 29 '20 at 11:01
  • 1
    Cheers, I'll check the release notes during the weekend if I can find something interesting! – Stuggi Mar 5 '20 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.