curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

curl sftp on an old Pi running Jessie

From: Michael Newman via curl-users <curl-users_at_cool.haxx.se>
Date: Sun, 25 Jul 2021 06:42:11 +0700

I'm trying get rid of all my .netrc files by setting up curl to use public key authentication. This involves three Pi 4s running Buster and one running Jessie. I have no problems with the new Pies. However, with the old Pi I have a problem.

Here are the Pi OS and hardware versions:

pi_at_rasp ~ $ grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"

pi_at_rasp ~ $ grep Revision "/proc/cpuinfo"
Revision : 0002 (Model B, Revision 1.0)

This works:

pi_at_rasp ~ $ ssh me_at_mydomain.com
Last login: Sat Jul 24 18:10:15 2021 from node-mt.pool-101-51.dynamic.totinternet.net
me_at_mydomain.com [~]#

And this works:

pi_at_rasp ~ $ sftp me_at_ftp.mydomain.com
Connected to ftp.mydomain.com.
sftp> quit

But this doesn't:

pi_at_rasp ~ $ curl -v -T /home/pi/webcam/rasp.txt -u me: --pubkey ~/.ssh/id_rsa.pub sftp://ftp.mydomain.com/
* Hostname was NOT found in DNS cache
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.254.225.101...
* Connected to ftp.mydomain.com (192.nnn.nnn.nnn) port 22 (#0)
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Failure establishing ssh session
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
curl: (2) Failure establishing ssh session

Here's the version of curl running on the old Pi:

pi_at_rasp ~ $ curl -V
curl 7.38.0 (arm-unknown-linux-gnueabihf) libcurl/7.38.0 OpenSSL/1.0.1t zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB SSL libz TLS-SRP

What am I doing wrong here?

Mike Newman
Korat, Thailand



-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-07-25