[Ksshaskpass] Confirmation required in order to use ssh key

I am trying out Kubuntu 24.10 with Plasma 6. Everything is good so far with my setup, but there is one thing that is making me go crazy.

Whenever I try to ssh into a machine, if I don’t start the ssh agent, I get a prompt to authorize the use of the ssh key and then a prompt to enter my password.

I managed to fix that by starting the ssh agent with eval $(ssh-agent -s). By doing that I am actually able to ssh into the machine without any prompts.However, when I try to run an ansible playbook (ssh agent already started) I always get the prompt to confirm the use of the ssh key as in the image.

Image](https://preview.redd.it/ksshaskpass-confirmation-required-in-order-to-use-ssh-key-v0-fk8jr91jkfoe1.png?width=567&format=png&auto=webp&s=9e01f40f98d620eeeb5c4a3a1b66ab9d2912d90e)

This is very annoying because I usually run playbooks on an inventory of 100+ hosts and in order to make it work I have to manually confirm the authorization for each host.

This is my ansible.cfg

[defaults] deprecation_warnings = False host_key_checking = False stdout_callback = yaml roles_path = ./roles [ssh_connection] ssh_args = -v -o ControlMaster=auto -o ControlPersist=60s -o AddKeysToAgent=confirm -o ForwardAgent=yes

And this is my .ssh/config

Host OMITTED User OMITTED Port OMITTED AddKeysToAgent confirm ForwardAgent yes StrictHostKeyChecking=no

Any clues on what I can do in order to solve that?

Welcome @guberlo :slight_smile: You set this when you add the keys to the agent. manually this can be done with ssh-add -c but you have forced it for all keys with this

1 Like