Page 1 of 1
SFTP Support
Posted: 23 Sep 2016 23:05
by MCHilli
Hey Martin, is it possible to add SFTP Support?
I don't get access to my Rasberry Pi.

Re: SFTP Support
Posted: 24 Sep 2016 13:27
by Martin
Hi,
I add it to the list of features under consideration but it's likely to take some time until I find the time to implement it.
In the meantime you could try to use action Execute SSH Command to copy a single file to the Rasberry Pi.
Command: cat > test.jpg
Feed input file: checked
Input File: /storage/emulated/0/picture.jpg
This will more or less be the same like executing the following command in a terminal:
cat picture.jpg | ssh user@host "cat > test.jpg"
You could probably also create a zip file on the Android device and then copy and unzip the file using the SSH action.
It's not very elegant since most unzip commands can't read from standard input but a command could look like this:
Command: cat > temp/archive.zip;unzip temp/archive.zip -d temp;rm temp/archive.zip
Input File: /storage/emulated/0/archive.zip
Regards,
Martin
Re: SFTP Support
Posted: 24 Sep 2016 16:10
by MCHilli
Thanks Martin, but i want it more for the Action "FTP Init Variable File List".
So i find a way over my router, to get a file list.

Re: SFTP Support
Posted: 24 Sep 2016 19:00
by Martin
You could als execute ls -l or a similar command over SSH to get the list of files in variable stdout.
You would have to use a script to split the resulting text into lines etc. so it's not very comfortable but could work.
Re: SFTP Support
Posted: 01 Dec 2018 19:31
by digitalstone
Using Execute SSH Command for sending files through SFTP works quite well.
I just can't seem to direct the files in any other directory than /root.
It's possible to get there from my pc with extra help like WinSCP or whatever, but it requires multiple manual steps, which defeats the purpose of automation in the first place.
Is there something extra in the Command-field that will solve this?
Re: SFTP Support
Posted: 02 Dec 2018 21:03
by Martin
Hi,
Why can't you send files to other locations than root?
Something like cat > /other/location/test.jpg should work usually (at least it works on my machine).
A command like cd /other/location && cat > test.jpg could also work.
Regards,
Martin
Re: SFTP Support
Posted: 02 Dec 2018 23:07
by digitalstone
Thanks Martin, i tried the first one more than a week ago, but then it failed.
Everything was just stored as the destination file inside /root along with slashes inside the name.
1 filename for example, was this: /share/Download/test.jpg
But now it works fine. I don't know why, maybe i missed something without realizing back then.
The second example also works btw.
Cheers!