Score:0

ssh-askpass error from sshpass/ssh

in flag

One of our suppliers delivered a new embedded system for us to test and one of my bash test scripts is failing with:

sshpass -p xxxxxx ssh  -o "StrictHostKeyChecking=no" root@rpi-2 "Do stuff"
ssh_askpass: exec(/usr/lib64/misc/ssh-askpass): No such file or directory
Permission denied, please try again.

It appears they have upgraded to Ubuntu (from Gentoo):

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

A google search led me to this forum where another thread (link removed) indicated a similar issue that was solved by installing an ssh-askpass package. Checking with apt list, I find there is no ssh-askpass installed on this system which I believe is the root cause of my issue. My problem is of course, most of this system is read-only and I cannot do any apt installs (at least none that would modify /bin /lib /usr etcetera).

I was under the impression ssh-askpass was used in a GUI environment and was not required for CLI invocations of ssh. While X is installed here, it is not involved in the session I am running from. Both DISPLAY and SSH_ASKPASS are unset in my environment.

So I am wondering if there is a workaround for this problem or is my only alternative to go back to the supplier and ask them to include ssh-askpass package in their distribution which they might do but will take at least one development cycle (months) to approve.

The end goal is simply to remote execute a bash script on a Raspberry Pi from the embedded system via the LAN with no user interaction (i.e. no password prompt).

Suggestions?

hr flag
Have you considered using public key authentication instead?
Score:0
in flag

Here's a workaround:

export SSH_ASKPASS=/var/bin/my_ssh-askpass

contents:

# my_ssh-askpass: Provide password to ssh
echo "password"
BaTycoon avatar
mm flag
You could use your variable inline so its not permanently set in the environment. `$ SSH_ASKPASS=/var/bin/my_ssh-askpass ssh -o "StrictHostKeyChecking=no" root@rpi-2 "Do stuff"`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.