I try to send text files from my raspberry pi 3 to my android phone, with the following line:

scp -P 2222 /mnt/extsdcard/download/sent.txt root@ home/pi/test.txt is my android phone's IP address.

I get this error: No such file or directory. I'm not sure that root is okay. What should be there in case of an android device, where can I see the username of it?

Thanks in advance.

  1. try to connect to android with ssh root@
  2. try this command: scp -P 2222 /mnt/extsdcard/download/sent.txt root@

As you answer, you have not turned on ssh on Android, basically this is not a problem from raspberry. You cannot use scp without ssh enabled.

Take a look to this and follow answers to how torn ssh on on Android device

  • I got this when writing 2.): ssh: connect to host port 2222: Connection refused lost connection. I tried it with my tablet too and it did not work either: "No route to host, lost connection" – chudeo Jul 12 '17 at 16:31
  • The first one is working_ – Francesco Gusmeroli Jul 12 '17 at 17:11
  • ssh root@ gives me this: ssh: connect to host port 22: Connection refused – chudeo Jul 12 '17 at 17:18
  • Thanks for the quick edition! As hopefully other users will use my application and it'll be likely they don't have any other application (like SSHDroid) downloaded only mine. Do you have an advice what i can use insted of SSH/SCP? – chudeo Jul 12 '17 at 21:35
  • Could you show more details about what you want to do and how? As I understood you want to send file from server(raspberry) to client (Android) Have you write some server side code? If yes, which language you used? – Francesco Gusmeroli Jul 13 '17 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.