May 16th, 2020

I found many articles on how to transfer files from PC to android with ssh. But the articles on getting files off were challenging. What I really wanted to do is be able to clear out my camera roll to my PC which means transferring and deleting.

I used an Android app SimpleSSHD on my tablet. As you can see, it is trivial to get the PC to scp files to Android. But the inverse gives you the error:

With a bit of playing around I realized I was able to execute commands via ssh and cat so happened to be one of those commands.

ssh androidIP -p androidPort 'cat /path/to/file/on/android' > /path/to/file/on/PC

I hope this hack gives you a workable solution. Have a better way? Let me know in the comment section below.

Posted In:

ABOUT THE AUTHOR:
Software Developer always striving to be better. Learn from others' mistakes, learn by doing, fail fast, maximize productivity, and really think hard about good defaults. Computer developers have the power to add an entire infinite dimension with a single Int (or maybe BigInt). The least we can do with that power is be creative.