cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3595135 ] Not able to specify relative path in the SCP URL

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 11 Dec 2012 23:23:12 -0800

Bugs item #3595135, was opened at 2012-12-11 23:23
Message generated for change (Tracker Item Submitted) made by balajiparasuram
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3595135&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SCP/SFTP
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Balaji Parasuram (balajiparasuram)
Assigned to: Daniel Stenberg (bagder)
Summary: Not able to specify relative path in the SCP URL

Initial Comment:
Curl manual states that "With sftp: and scp: URLs, the path name given is the absolute name on the server. To access a file relative to the remote user's home directory, prefix the file with /~/ , such as: curl -u $USER sftp://home.example.com/~/.bashrc"

But the above advertised behavior doesn't work for SCP URLs.

curl --version
curl 7.21.4 (powerpc-pc-netbsd-gnu) libcurl/7.21.4 OpenSSL/1.0.1c zlib/1.2.3 libssh2/1.4.2

# curl scp://lab:lab_at_10.16.134.207/~/s4810.cfg -k
curl: (79) Failed to recv file

curl scp://lab:lab_at_10.16.134.207/~/text.cfg -v -k
* About to connect() to 10.16.134.207 port 22 (#0)
* Trying 10.16.134.207... connected
* Connected to 10.16.134.207 (10.16.134.207) port 22 (#0)
* SSH authentication methods available: publickey,password
* Using ssh public key file /f10/.ssh/id_dsa.pub
* Using ssh private key file /f10/.ssh/id_dsa
* SSH public key authentication failed: Unable to open public key file
* Initialized password authentication
* Authentication complete
* SSH CONNECT phase done
* Failed to recv file
* Connection #0 to host 10.16.134.207 left intact
curl: (79) Failed to recv file
* Closing connection #0

SStk-0 # curl sftp://lab:lab@10.16.134.207/~/text.cfg -v -k
* About to connect() to 10.16.134.207 port 22 (#0)
* Trying 10.16.134.207... connected
* Connected to 10.16.134.207 (10.16.134.207) port 22 (#0)
* SSH authentication methods available: publickey,password
* Using ssh public key file /f10/.ssh/id_dsa.pub
* Using ssh private key file /f10/.ssh/id_dsa
* SSH public key authentication failed: Unable to open public key file
* Initialized password authentication
* Authentication complete
Hello world
* Connection #0 to host 10.16.134.207 left intact
* Closing connection #0

 

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3595135&group_id=976
Received on 2012-12-12

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET