cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: ssh custom port

From: el kalin <kalin_at_el.net>
Date: Mon, 18 Jul 2016 15:22:20 -0400

ok...

so here is what happens now with curl 7.49.1:

# curl -vvvv -T test.txt -u user:pass --insecure sftp://
remote.host.com:10022/upload/

* Trying 12.34.56.78...
  % Total % Received % Xferd Average Speed Time Time Time
 Current
                                 Dload Upload Total Spent Left
 Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
  0* Connected to remote.host.com (12.34.56.78) port 10022 (#0)
* SSH MD5 fingerprint: 1efeb85083b9658438c17f603fa8c5e0
* SSH authentication methods available:
publickey,password,keyboard-interactive
* Using SSH private key file ''
* SSH public key authentication failed: Unable to extract public key from
private key file: Unable to open private key file
* Initialized password authentication
* Authentication complete
* Upload failed: No such file or directory (2/-31)
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
  0
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
  0
* Connection #0 to host remote.host.com left intact
curl: (78) Upload failed: No such file or directory (2/-31)

but the directory is there i can clearly see it when sftp in and can put
files there too...

# sftp -oPort=10022 user_at_remote.host.com
Connecting to remote.host.com...
user_at_remote.host.com's password:
sftp> cd upload
sftp> put test.txt
Uploading test.txt to /home/user/upload/test.txt
test.txt

                                                     100% 0 0.0KB/s
  00:00
sftp> ls -al
drwxr-xr-x 1 user None 0 Jul 18 15:17 .
-rw-r--r-- 1 user None 0 Jul 18 15:17 test.txt
sftp>

 i'm using --insecure cause i was getting:

curl: (51) SSL peer certificate or SSH remote key was not OK

how come "Upload failed: No such file or directory"?!

thanks....

On Mon, Jul 18, 2016 at 2:41 PM, Jim Young <j4young_at_gmail.com> wrote:

> On 7/18/2016 11:59 AM, el kalin wrote:
>
>
>
> thanks ray...
>
> the version is 7.16.3.
>
> if it works with sftp though - which means ssh itself is not really the
> issue - why wouldn't it work with curl?
>
>
> 1) That version of curl is pretty old (ancient in "internet years") I
> think that's what comes with Red Hat by default which they haven't updated
> in a long, long time. I'd get a newer version for your system and try
> that. You can download pre-compiled versions for most systems and test
> with them even if you don't have admin rights on your particular system.
> 2) As to why it works with ssh but not curl - they could be using
> different libraries. One could be using a dynamically loaded system
> library and the other a statically linked library. You also may need to
> update the system ssl library if it's old.
>
> So - get a new version of curl and try it. If it still doesn't work, do a
> "curl -V" and cut & paste the result on your next post. You might also
> want to post what OS you're running on, version levels of the OS etc.
> There can be configuration issues with some OS'es that limit which programs
> are allowed to use non-standard ports.
>
> Jim Young
>
> -------------------------------------------------------------------
> 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
>
>

-------------------------------------------------------------------
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-18