SFTP not working **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
heersje
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Fri May 05, 2017 12:39 pm

SFTP not working **solved**

Post by heersje »

I cannot get SFTP to work so want to pick your brains to see what I am overlooking.
SFTPMB.png
SFTPMB.png (5.92 KiB) Viewed 4208 times
With those settings (except the path) I can login the SFTP server with e.g. filezilla

I also tried defining a service (succesfully loading the template first)

sftp://xys.net:password@xys.net.transurl.nl:22/subdomains/weather

but get this error message
Error: Couldn't read packet: Connection reset by peer

suggestions much appreciated

Jean-Paul
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 606
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: SFTP not working

Post by wvdkuil »

heersje wrote: Mon Jun 25, 2018 11:08 am I cannot get SFTP to work so want to pick your brains to see what I am overlooking.

With those settings (except the path) I can login the SFTP server with e.g. filezilla

I also tried defining a service (succesfully loading the template first)
Which version of Meteobridge are you using?
When I try to load a template from a https:// site I get an error message "support not compiled in"
sftp://xys.net:password@xys.net.transurl.nl:22/subdomains/weather
but get this error message
Error: Couldn't read packet: Connection reset by peer
suggestions much appreciated
Jean-Paul
1. you are using /subdomains/weather in your example and /subdomains/weer in the image.
Which one is correct, or maybe they are both invalid as you also mention
With those settings (except the path) I can login the SFTP server with e.g. filezilla
2. Is the port correct? Some providers, like mine, are using other ports

3. Most important is the path correct?
The path is NOT always the same as when you are using FTP.
SFTP and FTP are different server-programs and often has a different starting folder.
And the user-starting folder can also be set differently for every sftp/ftp user in your CPANEL.

The test fails when the path is incorrect.
Carefully check with filezilla without any extra path setting at all.
Than test to check if the sftp connection works, using exactly the same host / user / path / port / password as filezilla uses.
Use your CPANEL to check the starting folder for the user.

After succesfull upload you can compose the path based on the location where Meteobridge stored that test file.
The test-file test-upload has a length of 30 characters and contains the date time it was uploaded and maybe you have to check different folders using filezilla to find where it was uploaded to.

4. As long as you are only uploading to 1 website, there is no need to use ftp://user:password@......

5. Also DO NOT use special characters in a password, see other topics about that in this forum
Wim
Attachments
sftp2.jpeg
sftp2.jpeg (134.72 KiB) Viewed 4200 times
heersje
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Fri May 05, 2017 12:39 pm

Re: SFTP not working

Post by heersje »

Dear Wim,

Thanks for reflecting

I am using the very latest of MB ie 3.6-12224 (rebooted yesterday)
I downloaded the template from a https site but MB responds with succesfully loaded (but the problem already is with the test, I tried defining a service as another test)

port and server address are definitly correct as are username and password (which I anonymised here obviously)

The path is indeed my worry (in reality it is weer not weather but this was my error posting not when doing the test) When I use filezilla or winscp I arrive at a root which has subdomains as one of its folders just as www and a few others. I tried to upload the test file to an empty path and to a /www/test, a folder with full unix permissions, but still get the pestering Error: SFTP test upload failed: Couldn't read packet: Connection reset by peer particular . Maybe either my provider (transip.nl) or MB uses a non-standard SFTP protocol?

best Jean-Paul
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 606
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: SFTP not working

Post by wvdkuil »

Ok, I tried with tansip and indeed it is not working at all.
They support port 22 and 2222 both do not work.
With or without sftp://
All according to transip's documentation https://www.transip.nl/knowledgebase/ar ... filezilla/

Attached a screenshot.

I will mail meteobridge support the url of the meteobridge and ask if they can take a look,
Wim
Attachments
transip.jpeg
transip.jpeg (177.77 KiB) Viewed 4191 times
heersje
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Fri May 05, 2017 12:39 pm

Re: SFTP not working

Post by heersje »

ok thanks

but

I tried with and without sftp://xyz on the server address. Did you do that as well (for my ftp connection I do not specify ftp)
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 606
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: SFTP not working

Post by wvdkuil »

I used all combinations possible
with or without sftl://
port 22 or 2222
/ or /www or /www/
No success,

Wim
heersje
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Fri May 05, 2017 12:39 pm

Re: SFTP not working

Post by heersje »

Thanks hope this can be resolved for the day my FTP server is phased out
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 606
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: SFTP not working

Post by wvdkuil »

It looks like "transIP" forces the ftp programs to use a very recent set of encryption standards. And the currently used openwrt sftp client in Meteobridge does no provide that (yet).
But when you can continue to use FTP you can "wait and see".

I switched to another provider because of the long delays when using sftp with "transIP". It sometimes took 20-30 seconds to get a small file uploaded.
But again that can be my native FTP program also, although the Mac program (Transmit) is use is very fast to other sftp sites.

Wim
heersje
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Fri May 05, 2017 12:39 pm

Re: SFTP not working **solved**

Post by heersje »

Ok that is clear, for now my workaround is fine (posting on a FTP server, having a cronjob on transip fetching the data from there). My experiences with transip are very positive, it could be the software indeed. When I use filezilla everything goes smooth but WinSCP tends to drop the connection.

**solved** may not be the right term here, let's hope at one point there will be the latest standards in MB

thanks for sorting this out Wim.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: SFTP not working **solved**

Post by admin »

**solved** means here that the problem is understood and there is a work around. I don't think there will be a quick fix as this would IMHO need to install a complete new firmware and you might imagine what happens when a thousand users start doing so and some will for sure brick the devices by doing so. Not a good advice. It will need a bit more pressure than just having SFTP with one provider not working to go that route.

Alternatively you can tell the provider to be a bit more relaxed when doing SFTP with older ciphers/encryption instead of having the latest and greatest on his side and no further taking care what these minor security improvements do to users using embedded devices with limited capabilities. I question that this provider has even thought a second about that.

What you can try is using Meteobridge on a MR3020 v3 which has a very recent LEDE base. May be the SFTP implementation there does the job. If so, you have a personal upgrade path.
Post Reply