scp does not validate existance of file before connecting to remote host

Bug #160631 reported by James Hunt
4
Affects Status Importance Assigned to Milestone
openssh (Debian)
Fix Released
Unknown
openssh (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: openssh-client

This is a minor issue, but if you attempt to copy a non-existent file to an existing host, scp fails to detect this basic issue until *after* you have been prompted for the remote systems password.

Steps to recreate:

1. scp this_file_does_not_exist localhost:/tmp
2. enter your password for localhost
3. observe the error:

> scp this_file_does_not_exist localhost:/tmp
user@localhost's password:
this_file_does_not_exist: No such file or directory
>

This is with feisty (openssh-client version 4.3p2-8ubuntu1).

Thanks for reading!

LAST VERSION TESTED: openssh-client 1:5.5p1-4ubuntu4 (Maverick)

Revision history for this message
David Portwood (dzportwood) wrote :

Thank you for your suggestion. However, the changes you are requesting aren't really a bug and require more discussion, which should be done on an appropriate mailing list or forum. [WWW] http://www.ubuntu.com/support/community/mailinglists might be a good start for determining which mailing list to use.
Additionally this is by design, and all releases of ssh exibit this behavior, you might have better luck filing this bug upstream with obsd.

Changed in openssh:
status: New → Invalid
Revision history for this message
Colin Watson (cjwatson) wrote :

I think this is a perfectly valid bug and shouldn't have been rejected, although it is wishlist. I'll link it to the corresponding Debian bug.

Changed in openssh:
importance: Undecided → Wishlist
status: Invalid → Confirmed
Changed in openssh:
status: Unknown → New
Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Maverick Meerkat. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Changed in openssh (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
C de-Avillez (hggdh2) wrote :

cerdea@xango2:/build/buildd/uec/uec-testing-scripts$ scp doesNotExist cempedak.canonical.com:.
Warning: Permanently added 'cempedak.canonical.com' (RSA) to the list of known hosts.
doesNotExist: No such file or directory
cerdea@xango2:/build/buildd/uec/uec-testing-scripts$ apt-cache policy openssh-client
openssh-client:
  Installed: 1:5.5p1-4ubuntu4
  Candidate: 1:5.5p1-4ubuntu4
  Version table:
 *** 1:5.5p1-4ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status
cerdea@xango2:/build/buildd/uec/uec-testing-scripts$

Changed in openssh (Ubuntu):
status: Incomplete → Triaged
description: updated
Changed in openssh (Debian):
status: New → Fix Released
Revision history for this message
Bryce Harrington (bryce) wrote :

Reported to be fixed in 1:9.4p1-1

     - scp(1): when copying local->remote, check that the source file exists
       before opening an SFTP connection to the server (closes: #59255).

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.