SSH Legacy Crypto Login Compatibility
When you have valid creds or a valid key but modern clients won’t negotiate, force the legacy algorithms explicitly and keep the session controlled.
When this matters
This shows up on old appliances, unmanaged Linux builds, and “frozen” environments where SSH policy never got updated. The finding is usually not “you exploited SSH”. The finding is “the server requires or still accepts deprecated crypto”.
Keep this tight: prove negotiation, grab what you need, document the accepted algorithms.
Force legacy KEX and ssh-rsa to establish a session
Use this when you see group1 and ssh-rsa in enumeration, or when your client refuses to connect without overrides.
If you only need proof of access without an interactive session, run a benign command and exit:
uid=1000(user) gid=1000(user) groups=1000(user) target-host Linux target-host 5.10.0-... x86_64 GNU/Linux
If you’re using key-based auth on a legacy-only server
Same problem, different credential type. Combine the identity controls with legacy algorithm flags.
If you see “Too many authentication failures”, IdentitiesOnly=yes is mandatory.
Phase boundary: once you’re executing payload delivery or persistence actions, stop and put it in a Post-Exploitation or Persistence page. This page is only about establishing access when negotiation blocks you.
References
-
ssh(1) manual pageman.openbsd.org/ssh (opens in new tab)
Client algorithm forcing and remote command execution syntax.
-
ssh_config(5) manual pageman.openbsd.org/ssh_config (opens in new tab)
KexAlgorithms, HostKeyAlgorithms, PubkeyAcceptedAlgorithms.
Was this helpful?
Your feedback helps improve this page.