I'm trying to copy some files from my PC to my android device, yet I'm having trouble with the transfer. I connected easily using SSHDroid app, but scp returns ssh: Exited : Error connecting : Connection refused.

I typed the following line: scp user@PC:path/of/file user@android:destination/folder/path

I'm trying to transfer an audio file... if it matters. also the user and host of the android device appear as something along the lines of u0_312s@K3123 .

EDIT: After some more tries and adding -P port to the command i get a new error: Couldn't set nonblocking

  • are you able to ssh the android? What do you see in the logs of the "server"? – Jakuje Dec 21 '15 at 21:42
  • I am in the android... i think. SSHdroid logs say: 1) chmod failed, 2) Password auth succeeded ... , 3) child connection from ... – Ray Dec 21 '15 at 21:43
  • If you are on Android, do you have sshd server running on your PC? – Jakuje Dec 21 '15 at 22:00
  • I dont really know... I assume I do. I installed the openSSH package which should have the server also, right? Im on arch. – Ray Dec 21 '15 at 22:11
  • no, it is openssh-server. You can check by service ssh status or service sshd status – Jakuje Dec 21 '15 at 22:12

If you want to transfer file from your computer (PC in your example), it should be enough to run it in this form:

scp /path/of/file user@android:destination/folder/path

Otherwise it would try to connect also to your PC, which is not required.

| improve this answer | |
  • doing so gives the following error: "Error resolving ' ' port ' '. No address associated with hostname – Ray Dec 21 '15 at 21:50
  • of course you need to use the hostname of your phone, that is resolvable from your computer, or rather direct ip – Jakuje Dec 21 '15 at 21:53
  • i did keep the user and host that are shown on the prompt, something like u0_312s@K3123 . i also tried changing the phone user and host with root@'phone_ip' which just says connection refused – Ray Dec 21 '15 at 21:57

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.