curl-users
curl + sftp: Failure establishing ssh session
Date: Tue, 17 Jul 2012 21:19:09 +0200
Hello
I am on a Mac, with OS X Lion (10.7.4). I installed curl 7.26.0 via macports as such:
$ sudo port install curl +ssl +sftp_scp
This gives me the following curl version that should support sFTP:
$ /opt/local/bin/curl --version
curl 7.26.0 (x86_64-apple-darwin11.4.0) libcurl/7.26.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25 libssh2/1.2.7
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
However, when trying to connect to 'myserver' via sftp, I get the following error:
$ /opt/local/bin/curl --verbose --list-only --key ./mykey --pubkey ./mykey.pub sftp://myuser@myserver/
* About to connect() to myserver port 22 (#0)
* Trying XX.XX.XX.XX...
* connected
* Connected to myserver (XX.XX.XX.XX) port 22 (#0)
* Failure establishing ssh session
* Closing connection #0
curl: (2) Failure establishing ssh session
This confuses me to now end, because I can connect to the same 'myserver' using the same 'mykey' via ssh:
$ /usr/bin/ssh -2 -i ./mykey myuser_at_myserver
Warning: Permanently added the DSA host key for IP address 'XX.XX.XX.XX' to the list of known hosts.
[/]$
...and also via sftp:
$ /usr/bin/sftp -oIdentityFile=./mykey myuser_at_myserver
Warning: Permanently added the DSA host key for IP address 'XX.XX.XX.XX' to the list of known hosts.
Connected to myserver
sftp>
As a sidenote: --trace or --trace-ascii options only give me the same information as --verbose.
Any help with this is appreciated!
thanks,
-frank
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-17