How can I make SSH with an identity file always demand a password?

Morgan, Iain (ARC-TN)[InuTeq, LLC] iain.morgan at
Sun Aug 22 06:43:48 AEST 2021


Either AddKeysToAgent is enabled or you have ControlMaster set to "yes" or "auto".


On 8/21/21, 13:21, "openssh-unix-dev on behalf of matthewhtb at" < at on behalf of matthewhtb at> wrote:


    I hope my question is apt for this list.

    I am using OpenSSH_8.2p1 on Ubuntu 20.04.

    I connect to a remote SSH server with the -i /path/to/file identity file
    option. My local machine asks me for a password for the identity file.
    This is because I created a password when using ssh-keygen.

    However, after I exit from the SSH server, and log back in I am not asked
    for a password. Some kind of caching is happening.

    Is there a way to force the password to be asked on every occasion when
    using an identity file?

    I have searched but it looks as if everyone wants to avoid using
    passwords, not deliberately attempting to use them.

    Thank you.

    openssh-unix-dev mailing list
    openssh-unix-dev at

More information about the openssh-unix-dev mailing list