Skip to content

macOS SSH: match password prompts to the login account behind ProxyCommand and HostKeyAlias #274

Closed

Description

@akonwi

Follow-up from the review of #273 (fix for #270). Both are pre-existing and low severity.

  1. Bare Password: prompts count as the login account. SSHAttempt.isLogin(nil) is true, so an account-less password prompt is offered the destination's saved password and may be saved as it. OpenSSH names the account in password prompts, and in keyboard-interactive prompts ((user@host) Password:), so this needs a non-OpenSSH tool or an old ssh in a ProxyCommand. Option: treat a nil account as the login account only when ssh -G reports no proxyjump/proxycommand.
  2. HostKeyAlias hosts can't save a password. ssh puts the HostKeyAlias, not the HostName, in the password prompt, but SSHHost.configuration() builds the login account from user and hostname. The destination's own prompt doesn't match, so since fix(macos): never save a jump host's SSH password for the destination #273 the sheet doesn't offer Save in Keychain (before it, a saved password was never used for that prompt either). Option: use hostkeyalias from ssh -G when it's set.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    macosNative macOS app (apps/macos)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions