sshpass does not report file not found with -v -f, instead hangs

Bug #1935043 reported by Tgkprog
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
New
Undecided
Unassigned

Bug Description

Using sshpass to send a password to ssh-add

When I use a valid file path and give command :

I get the expected output
SSHPASS searching for password prompt using match "pass"
SSHPASS read: Enter passphrase for /home/tushar/.ssh/t/tgkprogOct2020:
SSHPASS detected prompt. Sending password.
SSHPASS read:

Identity added: /home/tushar/.ssh/t/tgkprogOct2020 (Tushar G Kapila <email address hidden> tgkprog in github, stackoverflow, twitter, fb and other places)

But when I use :

sshpass -v -f /home/tushar/work/pwdPathDoesNotExist -P "pass" ssh-add ~/.ssh/t/tgkprogOct2020

Where I have mistakenly put an incorrect path or file name, it does not report that the file does not exist, should do that first, instead if continues with issuing the command, looks for the text marker per -P and then tries to give it the password, and then hangs, as I guess there is no password to give and ssh-add keeps waiting. No error or warning emited.

Output:
SSHPASS searching for password prompt using match "pass"
SSHPASS read: Enter passphrase for /home/tushar/.ssh/t/tgkprogOct2020:
SSHPASS detected prompt. Sending password.

* After this command does not complete, hangs here

Revision history for this message
Tgkprog (tgkprog) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.