Skip to content

Fix passwordless key-based auth prompting for mandatory password#21

Merged
macnev2013 merged 1 commit intomainfrom
fix/passwordless-key-auth
Mar 18, 2026
Merged

Fix passwordless key-based auth prompting for mandatory password#21
macnev2013 merged 1 commit intomainfrom
fix/passwordless-key-auth

Conversation

@macnev2013
Copy link
Copy Markdown
Owner

Summary

  • Fixes key-based SSH auth (e.g. OCI instances) being blocked by an unnecessary password prompt
  • connectToServer() and requestTerminal() now check connection.authMethod before showing the password prompt
  • For .privateKey auth with no saved passphrase, connects directly with empty string (downstream code already converts this to nil)

Changes

File Change
ConnectionListViewModel.swift Added authMethod == .privateKey check in both connectToServer() and requestTerminal() to skip password prompt

Test plan

  • Create a connection with private key auth (no passphrase) — should connect without password prompt
  • Create a connection with private key auth and a saved passphrase — should use saved passphrase
  • Create a connection with password auth — should still prompt for password when not saved
  • Verify OCI instance connection works end-to-end with key-only auth

Fixes #16

🤖 Generated with Claude Code

When connecting to servers using private key authentication (e.g. OCI
instances), the app incorrectly showed a password prompt if no password
was saved in Keychain. Key-based auth doesn't require a password, so
the prompt blocked the connection entirely.

The fix checks `connection.authMethod` before showing the password
prompt. For `.privateKey` auth, it connects directly with an empty
password string (which downstream code already handles correctly by
passing nil as the passphrase).

Both SFTP browser and terminal connection paths are fixed.

Fixes: #16

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@macnev2013 macnev2013 merged commit 6d5fc24 into main Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passwordless OCI asking for mandatory password upon connection

1 participant