curl-users
Need help with SFTP
Date: 24 Oct 2008 05:03:40 -0000
Running 7.19.0/SSL over WinXP/Pro/SP2.
I want to SFTP to a remote Linux server. We run a router and NAT locally (I don't know if that's significant). I can't figure out why I can't get a full connection with cURL. We use FileZilla all the time with FTP and SFTP and have no problem accessing the server, so I don't think this is a passive/active connection issue. FileZilla shows the following SFTP negotiation:
Server version: SSH-2.0-OpenSSH_4.3p2 Debian-9etch2
Trace: Using SSH protocol version 2
Trace: We claim version: SSH-2.0-PuTTY_Local:_Feb_19_2008_21:07:47
Trace: Doing Diffie-Hellman group exchange
Trace: Doing Diffie-Hellman key exchange with hash SHA-1
Trace: Host key fingerprint is:
Trace: ssh-rsa 1024 bc:......:de
Trace: Initialised AES-256 SDCTR client->server encryption
Trace: Initialised HMAC-SHA1 client->server MAC algorithm
Trace: Initialised AES-256 SDCTR server->client encryption
Trace: Initialised HMAC-SHA1 server->client MAC algorithm
Trace: Using keyboard-interactive authentication. inst_len: 0, num_prompts: 1
Command: Pass: ******
Trace: Using keyboard-interactive authentication. inst_len: 0, num_prompts: 0
Trace: Access granted
My cURL command is as follows:
curl --ftp-ssl-control -sslv2 -v -m 60
-u user.here:psw.here -s -S
-o upload1.stdout
-T upload1.data ftp://ftp.domain.com:22/ftp/
And the response at the command-line is:
* Connected to ftp.domain.com (208......) port 22 (#0)
< SSH-2.0-OpenSSH_4.3p2 Debian-9etch2
* Closing connection #0
* Timeout was reached
curl: (28) Timeout was reached
It always stops right after receiving tht SSH message, then a pause up to the -m setting, then the timeout.
I've tried --ftp-ssl-reqd with no luck. I added -sslv2 to force v2, considering that's what the server is running, doesn't work with or without that. If I don't specify port 22 in the URI it connects to 21 and fails because that's not a secure port.
I have OpenSSL installed as well as the SSL-enabled cURL package. Do I also need to get LibSSH2 or some other libs?
I'm guessing the problem is with certs, and I can start poking in that area. But I can't find any docs that provide a start-to-finish HowTo for installing cURL, then OpenSSL, then ???, then a cert ?, then a command-line to connect to some server-X.
Thanks!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-10-24