Author Topic: SFTP Upload expected sha1 Error. **solved**  (Read 964 times)

0 Members and 1 Guest are viewing this topic.

Offline K7RMK

  • Senior Member
  • **
  • Posts: 56
    • East Wilson Weather
SFTP Upload expected sha1 Error. **solved**
« on: October 19, 2023, 08:06:01 PM »
I recently moved my webserver over to new hardware and Meteobridge gives me an "Expected sha1!!" error when using the SFTP Upload service. However, using the Test SFTP button within Service Settings successfully places the test-upload file into the test path directory I specify.
« Last Edit: October 24, 2023, 03:37:00 AM by docbee »
Ecowitt GW2000 + Meteobridge on RPI 4B
Ecowitt HP2551-C Display Console
Ecowitt WH32-EP Outdoor Temp/Humidity Sensor + MeteoShield Pro Radiation Shield
Ecowitt WS68 Anemometer
Ecowitt WH40 Rain Gauge
Ecowitt WH57 Lightning Sensor
Ecowitt WH41 Outdoor PM2.5 Air Quality Sensor
Ecowitt WH43 Indoor PM2.5 Air Quality Sensor
Ecowitt WH31 x4 Temp/Humidity Sensors
Ecowitt WH51 Soil Moisture Sensor
Ecowitt WH34S Soil Temperature Sensor
Ecowitt WN35 x2 Leaf Wetness Sensors

Offline docbee

  • Moderator
  • Forecaster
  • *****
  • Posts: 853
    • smartbedded
Re: SFTP Upload expected sha1 Error
« Reply #1 on: October 21, 2023, 06:22:09 AM »
Which Meteobridge platform are you using?

Did you try the newly introduced "Proxy SFTP" option (released September 30)?
https://meteobridge.com/wiki/index.php/Forum
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline K7RMK

  • Senior Member
  • **
  • Posts: 56
    • East Wilson Weather
Re: SFTP Upload expected sha1 Error
« Reply #2 on: October 21, 2023, 05:34:50 PM »
Which Meteobridge platform are you using?

Did you try the newly introduced "Proxy SFTP" option (released September 30)?
https://meteobridge.com/wiki/index.php/Forum
I am running Meteobridge on a Raspberry Pi 4B rev 1.5 using the meteobridge-rpi4-v1.4.bin image. I got it a month ago. Prior to that I was running a TP-Link TL-MR3020 since 2019.

My old webserver where SFTP Upload worked fine from both the TP-Link router and the RPI 4B was a Raspberry Pi 2B running Raspbian buster.

My new webserver where SFTP Upload gets the error Expected sha1!! from Meteobridge running on the RPI 4B (haven't tried the TP-Link router) is an Orange Pi 5 Plus running Armbian bookworm. So this is the latest Debian release (bookworm) vs buster which is two releases ago. The part that's so baffling is the Test SFTP button successfully uploads the test-upload file with no error.

I did try Proxy SFTP. I get this error:
Quote
Error: SFTP connect to k7rmk.com via port 2051 failed. (no more tries):
My Template is https://weather.k7rmk.com/saratoga-wx/gen-MBtags.php
My Path is proxysftp://USERNAME:PASSWORD@k7rmk.com:2051/var/www/weather.k7rmk.com/saratoga-wx/MBtags.php

I don't know if this is related or not but when I got the new webserver, I did have to update PuTTy and WinSCP on my PC to the latest versions because I was getting the following error when I tried to connect via SSH and SFTP:
Quote
Couldn't agree a key exchange algorithm
Ecowitt GW2000 + Meteobridge on RPI 4B
Ecowitt HP2551-C Display Console
Ecowitt WH32-EP Outdoor Temp/Humidity Sensor + MeteoShield Pro Radiation Shield
Ecowitt WS68 Anemometer
Ecowitt WH40 Rain Gauge
Ecowitt WH57 Lightning Sensor
Ecowitt WH41 Outdoor PM2.5 Air Quality Sensor
Ecowitt WH43 Indoor PM2.5 Air Quality Sensor
Ecowitt WH31 x4 Temp/Humidity Sensors
Ecowitt WH51 Soil Moisture Sensor
Ecowitt WH34S Soil Temperature Sensor
Ecowitt WN35 x2 Leaf Wetness Sensors

Offline K7RMK

  • Senior Member
  • **
  • Posts: 56
    • East Wilson Weather
Re: SFTP Upload expected sha1 Error
« Reply #3 on: October 21, 2023, 07:01:30 PM »
Update: Ok I fixed it. I poked around in Meteobridge on the RPI 4B via SFTP and found the file known_hosts in the directory /.ssh. I cleared the contents and tried again and now it works. So the problem is Meteobridge has no mechanism to update the keys when a new SFTP server is swapped in place on the same IP address. I still don't understand why the test worked though.  :???:
Ecowitt GW2000 + Meteobridge on RPI 4B
Ecowitt HP2551-C Display Console
Ecowitt WH32-EP Outdoor Temp/Humidity Sensor + MeteoShield Pro Radiation Shield
Ecowitt WS68 Anemometer
Ecowitt WH40 Rain Gauge
Ecowitt WH57 Lightning Sensor
Ecowitt WH41 Outdoor PM2.5 Air Quality Sensor
Ecowitt WH43 Indoor PM2.5 Air Quality Sensor
Ecowitt WH31 x4 Temp/Humidity Sensors
Ecowitt WH51 Soil Moisture Sensor
Ecowitt WH34S Soil Temperature Sensor
Ecowitt WN35 x2 Leaf Wetness Sensors

Offline docbee

  • Moderator
  • Forecaster
  • *****
  • Posts: 853
    • smartbedded
Re: SFTP Upload expected sha1 Error
« Reply #4 on: October 22, 2023, 03:04:20 AM »
Great that you found the root cause and thanks for sharing. I will check how to get around this.

I have the same problem when using a Linux ssh client connecting to a system I have visited before and that has changed keys because of being newly setup or alike.
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick