Bug 1043635

Summary: Error from sss_ssh_knownhostsproxy when scp'ing a file with a complex name (spaces?)
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: abokovoy, asn, jcholast, jhrozek, jpazdziora, lslebodn, pbrezina, sbose, sgallagh, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-17 08:08:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Adam Williamson 2013-12-16 19:03:45 UTC
Ran into this on Rawhide this morning:

[adamw@adam Videos]$ scp "Screencast from 16-12-13 10:32:18 AM.webm" www:/home/adamw
Usage: sss_ssh_knownhostsproxy [-?] [-?|--help] [--usage] [-p|--port=INT]
        [-d|--domain=STRING] HOST [PROXY_COMMAND]
The path to the proxy command must be absolute
ssh_exchange_identification: Connection closed by remote host
[adamw@adam Videos]$ mv Screencast\ from\ 16-12-13\ 10\:32\:18\ AM.webm alt-kat.webm
[adamw@adam Videos]$ scp alt-kat.webm www:/home/adamw
alt-kat.webm                                  100%  898KB 897.6KB/s   00:00    

seems quite self-explanatory - the scp explodes in sss_ssh_knownhostproxy when I'm trying to transfer a file with a 'complex' name (I'm guessing it's the spaces), works fine when I rename the file to be simple (short, ascii, no spaces).

Comment 1 Adam Williamson 2013-12-16 19:03:56 UTC
[root@adam Videos]# rpm -q sssd-common
sssd-common-1.11.2-1.fc21.x86_64

Comment 2 Jan Cholasta 2013-12-17 07:44:38 UTC
This is not related to sss_ssh_knownhostsproxy, scp will fail without sss_ssh_knownhostsproxy as well:

$ scp "Screencast from 16-12-13 10:32:18 AM.webm" vm-143:file
ssh: Could not resolve hostname Screencast from 16-12-13 10: Name or service not known

As you can see, scp considers the part of the filename before the first colon to be a hostname ("Screencast from 16-12-13 10" in this case).

Comment 3 Adam Williamson 2013-12-17 08:08:14 UTC
oh, man, I totally knew that and forgot about it. Probably some way around it with a double escape or something. sorry.

Comment 4 Andreas Schneider 2013-12-17 15:30:15 UTC
scp is really a bad hack, sftp is what shoud be used. Maybe I should write a scp binary which uses sftp from libssh one day.