VPS · Question & answer

How do I recover from an SSH lockout on a VPS?

Use an independent authorised console or an existing verified session to diagnose the lockout. Determine whether it is a network, service, key, account or policy failure. A broad password reset or firewall shutdown may change the wrong thing and create additional risk.

AdvancedVPS services; platform features and management permissions depend on the selected serviceLinux commands apply only inside a compatible Linux guest
Go to the answer

Instructions

1. Open the correct recovery access

Use Britixo’s Access controls where offered and verify the selected VPS identifier. Keep temporary console information and any returned credentials private.

2. Inspect the relevant Linux state

Start with listener and configuration validation, then review the exact authentication error.

Remote Linux shell
sudo ss -lntp
sudo sshd -t

ss shows whether SSH is listening. sshd -t checks configuration syntax and key sanity without applying a new configuration; the executable path can vary by image.

3. Correct only the identified cause and test separately

Restore the intended account key, ownership, allowed source or valid configuration through the authorised process. Keep the console open and establish a second external SSH session using host verification. If using a password-reset control, understand which account it changes and update affected connections deliberately.

Check the result

  • A fresh external SSH session authenticates to the correct account.
  • The recovery console remains available until access and intended restrictions are verified.

Troubleshooting

sshd configuration validation fails
Correct the specific reported directive before attempting a reload.
Keys are valid but the connection never reaches SSH
Inspect routes and provider or guest firewall restrictions rather than replacing credentials.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.