While running an Ansible playbook on one of my servers from an Arch device, I encountered the following error:

TASK [Gathering Facts] *****************************************************************************************************************************************************
[ERROR]: Task failed: Failed to connect to the host via ssh: ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory
Host key verification failed.

It looks like the /usr/lib/ssh/ssh-askpass file doesn’t exit. To find out what package the missing file comes from, we can use pacman -F or pacman --files.

❯ pacman --help
usage:  pacman <operation> [...]
operations:
    pacman {-h --help}
    pacman {-V --version}
    pacman {-D --database} <options> <package(s)>
    pacman {-F --files}    [options] [file(s)]
    pacman {-Q --query}    [options] [package(s)]
    pacman {-R --remove}   [options] <package(s)>
    pacman {-S --sync}     [options] [package(s)]
    pacman {-T --deptest}  [options] [package(s)]
    pacman {-U --upgrade}  [options] <file(s)>

use 'pacman {-h --help}' with an operation for available options
❯ pacman -F /usr/lib/ssh/ssh-askpass
usr/lib/ssh/ssh-askpass is owned by extra/x11-ssh-askpass 1.2.4.1-7

Let’s stall this package:

❯ sudo pacman -S x11-ssh-askpass
resolving dependencies...
looking for conflicting packages...

Packages (1) x11-ssh-askpass-1.2.4.1-8

Total Download Size:   0.02 MiB
Total Installed Size:  0.04 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 x11-ssh-askpass-1.2.4.1-8-x86_64                                            20.2 KiB   182 KiB/s 00:00 [#############################################################] 100%
(1/1) checking keys in keyring                                                                          [#############################################################] 100%
(1/1) checking package integrity                                                                        [#############################################################] 100%
(1/1) loading package files                                                                             [#############################################################] 100%
(1/1) checking for file conflicts                                                                       [#############################################################] 100%
(1/1) checking available disk space                                                                     [#############################################################] 100%
:: Processing package changes...
(1/1) installing x11-ssh-askpass                                                                        [#############################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Reference:

https://bbs.archlinux.org/viewtopic.php?id=262806