Linux - MobileThis forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How would I setup an (rooted) Android PC to use on my LAN, including installing an /etc/hosts (or equivalent) on it and SSH keys so I can rsync user data to it?
I don't know the answer. Mainly because I have no idea which device is it, what OS is running now on it. How can you connect it to your LAN? What do you mean by your LAN at all?
Do you have a connection problem or ssh related issue, or rsync or ????
Good; SSHD on Android might be nice, but for me, maybe overkill; I just want my ssh keys in my 'home' folder and Android PC system-wide hosts file to use rsync to copy from other hosts on LAN.
That's good, but I usually rsync to a host I'm on from a remote host, even if it'll be a little harder typing on the Android. Some directory/folder names are different or in a different place, and it's easier to specify those on the host being copied to.
If I SSH/rsync on Android, I'll be typing in Android (said this already) shell and SSH to desktop/server or rsync, in Android shell, files from desktop/server to Android; stated don't need SSHD on Android. I t'd be like below.
Code:
user@android~# ssh user@desktop
user@desktop~# ls
user@desktop~# exit
user@android~# scp -r user@desktop:books .
or
user@android~# rsync -av user@desktop:books .
I don't know where user's home folder nor system-wide hosts file are on Android (I'd rather type hostname than 192.168.1.101.)
Well Android doesn't follow the FHS. But on my phone, the hosts file is /etc/hosts. You could look under /system/etc/hosts perhaps?
It's there but read-only even for root.
Quote:
Which direction are you trying to copy files? To Android or from Android? And do you want to use the Android shell or not?
I wrote that out in complete detail above. I recall that some Android terminal emulators have shells and packages such as rsync, so I installed that but will have to write the full IP address... at least it's easier than the broken connection software in KDE/dolphin.
However, apparently the Android terminal I used installs rsync in an unprivileged user's chroot, but root owns SD card and can't use that rsync (at least without a lot of unknown configuration.)
Android is a mess!
I might have to end up doing what you linked even though the command-line is a bit more complicated.
Then don't answer; I'm a Unix & Slackware user here who was being helped by a Slackware user, and we know what it's about.
I may end up doing what rkelsen linked, but that was about copying it from Android to destkop/server, opposite of what I wanted to do.
Despite all the 'apps' you didn't describe, sometimes command-line is nicer.
Then don't answer; I'm a Unix & Slackware user here who was being helped by a Slackware user, and we know what it's about.
what a polite approach (from a slack guy). I guess you need to formulate a better question to be able to help you. It is you, who want to solve an issue, not me. I wanted to ask why do you want to reinvent the wheel, why don't you use an already existing solution? What is missing. But I don't care/don't ask any more.
Quote:
Originally Posted by dchmelik
Despite all the 'apps' you didn't describe, sometimes command-line is nicer.
You can find a lot of ssh/scp/sftp clients for android, I guess I don't need to describe it better.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.