Bug 2984 - scp -3 authentication fails when providing key passphrases for two remote hosts
Summary: scp -3 authentication fails when providing key passphrases for two remote hosts
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: 7.9p1
Hardware: Other Linux
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-20 09:14 AEDT by proctor
Modified: 2019-07-15 12:04 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description proctor 2019-03-20 09:14:59 AEDT
OpenSSH_7.9p1 Debian-6, OpenSSL 1.1.1a  20 Nov 2018

this situation has been ongoing for years now. when i have tried to send files using the -3 option i am presented with two simultaneous passphrase prompts like so:

scp -3 root@remote1:/home/remote1/testfile root@remote2:/home/remote2
Enter passphrase for key '/remote1.key': Enter passphrase for key '/remote2.key':

## note that the order that the keys are asked for can change ##

depending on which passphrase is entered next, one of two situations arise:

1. if the LAST asked for passphrase is entered first (in the case above this would be remote2.key) then there are no errors printed, and the system asks for the passphrase for remote1.key. however upon giving the remote1.key passphrase it will ask for remote2.key passphrase again, and will continue to alternate between the two i believe until 3 tries are made for each, whereupon it will fail auth.

2. if the FIRST asked for passphrase is entered first, (in the case above this would be remote1.key) then after enter is sent the system just sits waiting with no feedback printed at all. simply pressing enter at this point will cause the auth to fail immediately. any input entered at the keyboard is displayed in clear text on the screen.

in order to complete the auth i have found that it is necessary to, after situation 2 above, enter some character (i have tried "a" and "n" -- both work) after the first passphrase has been sent and the system is waiting, and press enter again. this seems to be interpreted as a wrong passphrase for remote2.key and the passphrase for remote2.key is asked for again. at this point, if i enter the passphrase for remote2.key and send enter, the auth completes, and the testfile is sent.


i am hoping this report gives enough information so as to make this work more easily.
Comment 1 Castro B 2019-07-15 12:04:49 AEST
Thank you proctor thats helps alot but i hope you can really make it user friendly

Castro B,
http://webtrafficgeeks.org