Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

copy file from PC to Android

7 views
Skip to first unread message

pinnerite

unread,
Sep 10, 2019, 3:57:23 PM9/10/19
to
On advice received here, i installed sshelper on my Android 9 cellphone.
I can ssh to the phone but I want to scp a pdf file to it but my command
produces permission denied.

This is what have:
sshelper says that the Android's port number is 2222 and its ip address
is 192.68.0.115.

My computer Ip address is 192.168.0.4

In sshelper I cd to SDCard/Download, then

$ scp 192.168.0.4:/home/myhome/pdf_folder/my_file.pdf .

I am then asked for 192.168.0.4's password.

I supply my login password and get 'Permission denied'

Is what I am trying to do possible using sshelper?

pinnerite

unread,
Sep 10, 2019, 4:02:53 PM9/10/19
to
I forgot to add that I am using Putty on the PC (Linux Mint).

David Taylor

unread,
Sep 11, 2019, 5:06:32 AM9/11/19
to
On 10/09/2019 20:57, pinnerite wrote:
> On advice received here, i installed sshelper on my Android 9 cellphone.
> I can ssh to the phone but I want to scp a pdf file to it but my command
> produces permission denied.

I use File Manager HD which allows FTP access.

--
Cheers,
David
Web: http://www.satsignal.eu

Arlen G. Holder

unread,
Sep 11, 2019, 9:55:59 AM9/11/19
to
On Wed, 11 Sep 2019 10:06:31 +0100, David Taylor wrote:

> I use File Manager HD which allows FTP access.

It's nice you took a chance to answer this question since this is a risky
question to answer given the precisemenss of some of the points and the
ambiguity of others, where I've listed the FTP servers (and others) I've
tested here:
<https://groups.google.com/d/msg/comp.mobile.android/JrWLPRYO-TU/l6GBDGjwBgAJ>

I didn't answer the Op's question because it's not clear, to me, what the
OP's main goal is, since there are literally _many_ ways to "copy files
from Linux to Android" & vice versa, e.g.,
<http://www.bild.me/bild.php?file=6181360dir01.jpg>

There are so many ways that I will have trouble listing them, e.g.,
o FTP (as you noted), via ports 22/21 for example, or sftp)
o WebDAV (as we've discussed in the past)
o HTTP and https (as we've discussed many times)
o MTP (as we've discussed many times)
o adb (all of which we've covered in detail)
o expansion slots (which are obvious)
o CalDAV (for certain types of files)
o SMB (again, all of which we've covered)
o LibMTP & MTPDrive (for those who like command line access)
o Proprietary solutions (e.g., AirDroid, WiFiDirect, Kies, DoubeTWist, etc)
o and, of course, ssh
o And likely a few I've missed in this ad hoc summary

Some of which matter "how" the Android device is connected, e.g.,
o USB versus WiFi versus expansion slots, etc.

Using the following random references as my memory aid:
o Tutorial to run any Windows command directly on Android over either USB or Wi-Fi
<https://groups.google.com/d/msg/comp.mobile.android/JrWLPRYO-TU/7BMBh2WjBQAJ>

o Do you have a working freeware automatic sync between Android & Windows?
<https://groups.google.com/d/msg/comp.mobile.android/7aOWwoEwsZ0/3f5qTpwBAgAJ>

o Do these 3 WiFi tests of a network location to a drive letter mapping work for you on Android 7.0 Nougat & Windows 10 using only freeware?
<https://groups.google.com/d/msg/comp.mobile.android/IswZ5yEcpYA/wWuqoICZBgAJ>

o what is "android debug bridge"
<https://groups.google.com/d/msg/comp.mobile.android/K4UNdlVrrvs/yAB71Yp9AgAJ>

o Freeware to access your Android hosts file from Windows without being root
<https://groups.google.com/d/msg/comp.mobile.android/LTQtwSGROw8/XePw-iPuAgAJ>

o Has anyone here ever set up a CalDAV server on Windows for use with Android CalDAV clients?
<https://groups.google.com/d/msg/comp.mobile.android/52iSsFUQinE/TOVW_iPNEQAJ>

o How to mount the entire mobile device file system on Linux
<https://groups.google.com/d/msg/comp.mobile.android/6PQmYWSk34I/9kz19EkZCQAJ>

o What do you use to copy text files from Windows XP to Android over WiFi?
<https://groups.google.com/d/msg/comp.mobile.android/OkDfuDN9fZU/mFAMnIPGFQAJ>

etc.

This is not a critique of the OP's post; it's just a note why I didn't try
to answer it, simply because the OP seems to want to use ssh which I'm
unfamiliar with given that I use many of the other methods instead.

The OP might be way ahead of us given the type of question, so I hope this
is taken simply in the light of saying that there are MANY ways to copy
files back and forth - but each has its own pros and cons, so everything
depends on the problem set that we are trying to resolve, which I'm
confused about for this thread.

Anssi Saari

unread,
Sep 12, 2019, 4:08:29 AM9/12/19
to
pinnerite <pinn...@gmail.com> writes:

> In sshelper I cd to SDCard/Download, then
>
> $ scp 192.168.0.4:/home/myhome/pdf_folder/my_file.pdf .
>
> I am then asked for 192.168.0.4's password.
>
> I supply my login password and get 'Permission denied'
>
> Is what I am trying to do possible using sshelper?

I think so, I've certainly done similar. Mostly with rsync though.

Anyways, I think you problem is not specifying the user on your PC
unless you happen to have a the same user on your PC as your phone. On
my phone the user is u0_a233 for whatever reason.

So try

scp pinn...@192.168.0.4:/home/myhome/pdf_folder/my_file.pdf .

Lothar DeBaser

unread,
Sep 12, 2019, 6:45:07 AM9/12/19
to
I've installed samba on my PC, and so it's file system appears in the
file manager on my phone.

--
Un chien andalu-sia

Carlos E.R.

unread,
Sep 12, 2019, 7:48:06 AM9/12/19
to
Maybe, but you do not specify the user name. You can omit the name if it
is the same as in your (client) computer, otherwise you have to specify it.


--
Cheers, Carlos.

Lucifer

unread,
Sep 13, 2019, 9:40:44 PM9/13/19
to
I use FTP.

Lucifer

unread,
Sep 13, 2019, 9:44:54 PM9/13/19
to
On Thu, 12 Sep 2019 13:45:20 +0200, "Carlos E.R."
<robin_...@es.invalid> wrote:

>On 10/09/2019 21.57, pinnerite wrote:
>> On advice received here, i installed sshelper on my Android 9 cellphone.
>> I can ssh to the phone but I want to scp a pdf file to it but my command
>> produces permission denied.

>> Is what I am trying to do possible using sshelper?
>
>Maybe, but you do not specify the user name. You can omit the name if it
>is the same as in your (client) computer, otherwise you have to specify it.

I use root as the login name with the FTP server.
0 new messages