Bug 982 - scp doesn't work with password authentication when copying from remote to remote
Summary: scp doesn't work with password authentication when copying from remote to remote
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: 3.9p1
Hardware: All Linux
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-08 01:07 AEDT by Tomas Mraz
Modified: 2023-01-13 13:57 AEDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (650 bytes, patch)
2005-02-08 01:11 AEDT, Tomas Mraz
no flags Details | Diff
updated patch (507 bytes, patch)
2006-04-03 16:47 AEST, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mraz 2005-02-08 01:07:59 AEDT
This happens when copying from my1.box to my2.box:

scp root@my1.box:/etc/motd root@my2.box:/tmp/foo
Asks password for one side then displays
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).

The reason is that the ssh invoked on the first machine will have input
redirected from /dev/null and thus it cannot authenticate.

See also https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=103364
Comment 1 Tomas Mraz 2005-02-08 01:11:34 AEDT
Created attachment 805 [details]
Proposed patch

This patch calls ssh with option to force tty allocation so it's possible to
enter the password.

Do you think it's correct?
Comment 2 Damien Miller 2006-04-03 16:47:56 AEST
Created attachment 1108 [details]
updated patch

The scp changes in 4.3 broke the old patch, so here is an updated one.
Comment 3 Damien Miller 2006-04-16 11:13:38 AEST
After thinking about this some more, there is a good reason why this patch should not go in: when you perform a copy "scp host_a:file host_b" with this patch, you must expose your password on "host_a" rather than the local host. 

You may not trust "host_a" with your "host_b" password (e.g. someone making a trojan scp binary there could easily collect passwords without your knowledge), and it isn't obvious to someone without a good knowledge of how this actually works that they are actually entering a password on a non-local system. 

Adding a warning is probably not practical because the host that initiates a remote to remote copy doesn't know what authentication mechanisms will be needed.
Comment 4 Darren Tucker 2006-10-07 11:38:39 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.