cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libssh2 scp working?

From: <man_at_tfhs.net>
Date: Mon, 16 Oct 2006 13:32:40 -0000

> This is one of the things I want to talk about.
>
> I use scp a lot and my most common usage is
>
> scp username_at_server:~/filename .
>
> And from what you said, that would be cURL'd as
>
> curl sftp://username@server/~/filename -O
>
> But in the end I guess I have to look more closely at what ftp and
> tftp do after calling curl_easy_unescape()
>

by default, either the client or server side (not sure which) of openssh's
implementation of scp places you in the users homedir by default, so:

scp user_at_server:file.ext .

will get 'file.ext' from user's dir without resorting to the shell glob
'~', which was probably expanded on your localhost anyway....

it would be nice if the curl implementation of scp could maintain this
'auto changedir' option, since a user may not know the exact location of
the homedir of the remote user account. i routinely have this problem
because i must grab data from a client's machine using scp, and they do
weird things like move the homedir, etc. being able to replace my current
expect/scp script with curl would be sweet.

allan

-- 
m. allan noah
IT Director, TfHS.net
ph# (804) 355-5489
tf# (866) 724-9722
fx# (804) 355-0477
Received on 2006-10-16