Authentication

SSH can use public keys and certificates, passwords, keyboard-interactive, host-based authentication, GSSAPI, hardware-backed keys, or a required sequence of methods. Assess the effective policy for the specific user, source, and server configuration.

阅读约 1 分钟更新于 2026年10月21日florianamette1 位贡献者
在你的助手中提问(MCP)在 GitHub 上编辑

OpenSSH can authenticate clients through public keys or certificates, passwords, keyboard-interactive mechanisms, host-based authentication, GSSAPI, and hardware-backed security keys. AuthenticationMethods can also require a sequence such as public key followed by keyboard-interactive. The effective methods may vary with Match rules, username, source address, groups, and other connection attributes. Review the complete authentication chain before assessing password guessing, exposed private keys, weak key generation, certificate trust, or multifactor controls.

bash
# non-interactive diagnostic; inspect the server-reported continuation methods
ssh -vvv -o BatchMode=yes -o PreferredAuthentications=password \
  -o PubkeyAuthentication=no user@<target> true 2>&1 \
  | sed -n 's/^debug1: Authentications that can continue: //p'

Subtopics#

References#