SSH won't load used wrong account then exited and now can't get in

April 3, 2018 200 views
Control Panels Ubuntu 16.04

I have a Ubuntu 16.04 install with wordpress, I tried to SSH in using the floating IP assigned to it and entered the wrong user name so I exited the SSH session after a few failed tries getting in now I can't SSH in at all even using the droplet's IP address.

1 Answer

I'd usually recommend against using ssh through your floating IP. In fact I'd recommend blocking port 22 for requests coming in on your anchor IP altogether and access ssh only through the direct IP. This way if you're running a public service users will not be able to easily find your ssh service (I'd also recommend changing from the default port and consider using fail2ban).

Are you using fail2ban on your server? This will block your IP from logging in for a certain amount of time after failed login attempts. If so, simply waiting for the block to time out should allow you access again.

Anytime you are unable to log in using ssh you can try accessing your droplet through the console in the control panel (located in Access under your droplet). While it does not support copy/paste currently, this web console will allow you to access your droplet even if it's network is disabled. Your droplet sees the console as it's local keyboard and display.

I would recommend:

  • If running fail2ban, wait a bit and try again
  • If not, try logging in through the console.
  • If you're unable to access the console (make sure to disable any ad-blockers) you can try rebooting your droplet from the control panel.
  • If after a reboot the console and ssh remain inaccessible please open a ticket with our support team so they can take a closer look.
  • Thanks, I will change the firewall rules then and it seems like fail2ban is the issue. I will try again in a few hours.

Have another answer? Share your knowledge.