Skip to content

Prompt for passphrase if private key is encrypted #426

@guludo

Description

@guludo

Hi there.

By browsing the code and looking a some Github issues, it looks like that passing a passphrase as argument is required when the private key to be used is encrypted. While that makes a lot of sense, I think it would be nice if asyncssh provided a way to automatically prompt for the passphrase if the private key is encrypted. For example:

async with asyncssh.connect('localhost', client_keys=['my_ssh_key'], passphrase=prompt_passphrase) as conn:

Where prompt_passphrase is a callable that will interactively read the passphrase from the keyboard. Such a callable would be used only if my_ssh_key is encrypted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions