cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: ssh custom port

From: Norton, Mike <mikenorton_at_pwsd76.ab.ca>
Date: Tue, 19 Jul 2016 16:04:23 +0000

> ok. got it...  this worked:
>
> curl -vvvv -T test.txt -u user:pass --insecure
> sftp://remote.host.com:10022/home/user/upload/
>
> which is a unusual since it's exposing more than it should but it's not my server, so...

There's nothing unusual about that. The sftp utility started you off in your home directory, and then you "cd"ed to the upload subfolder. But a URI is always the full path, from the root directory.

You could also specify the URI as "sftp://host.example.com:10022/~/upload/", with "~" being the standard Unix abbreviation for "my home directory."

-mn

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-07-19