Problem configuring SSH profile to connect to remote android box

Asked by Simone Gaiarin

Hi,
I'm trying to configure a backintime ssh profile to save my backup on an hard drive connected to a remote android minipc. I've configured the dsa keys to login remotely, infact I can login with:

ssh -i .ssh/id_dsa_backintime backintime@192.168.10.254 -p57995

But when I try to configure backintime I get the following error.

Here the config page:
http://imagebin.org/297980

Hee the erro I get:
http://imagebin.org/297982

I've tried to mount with sshfs and I can mount it but I can access the mounted folder only as root. So I've tried to configure a backintime root ssh profile but also that doesn't work.

How can I solve this?
Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Back In Time Edit question
Assignee:
No assignee Edit question
Solved by:
Simone Gaiarin
Solved:
Last query:
Last reply:
Revision history for this message
Germar (germar) said :
#1

Hi Simone,
please run 'ssh-add .ssh/id_dsa_backintime; ssh -o PreferredAuthentications=publickey -p 57995 -o ServerAliveInterval=240 backintime@192.168.10.254 echo "Hello"' in Terminal and post the output in here. This is the command which is used to test pw-less login.

Regards,
Germar

Revision history for this message
Simone Gaiarin (simgunz) said :
#2

After running:

ssh-add .ssh/id_dsa_backintime

if I run:

ssh -o PreferredAuthentications=publickey -p 57995 -o ServerAliveInterval=240 backintime@192.168.10.254 echo "Hello"

I get:

exec request failed on channel 0

but if I run:

ssh -o PreferredAuthentications=publickey -p 57995 -o ServerAliveInterval=240 backintime@192.168.10.254

I get into the remote shell and then I can run echo "hello world" without error.

This problem seems related to the specific SSH Server I'm using on android. But does actually Backintime need to execute command remotely?

Revision history for this message
Simone Gaiarin (simgunz) said :
#3

Ok. I changed the SSH server and now I can run the remote command echo "Hello".

But now I get the following error, when I configure Backintime:

http://imagebin.org/298063

Revision history for this message
Germar (germar) said :
#4

Yes, unfortunately it need to run commands because sshfs doesn't support hard-links. So at least 'cp -aRl' must run on remote host. And to speed things up we also run couple other commands remote, too.

With the new 'Full rsync mode' this could be changed again (hard-links are created with rsync) but that would slow it down, too.

Looks like you need to replace remote rsync, too.

Revision history for this message
Simone Gaiarin (simgunz) said :
#5

Ok I'm doing progress.

Following the guide (1) I've installed rsync on android, since it is not provided by busybox.

Now I've to found a way to make the busybox commands the default ones to prevent the errors on ls as already explained in the Answer #240502.
I can't understand where should I export the PATH variable.
Do you know how to do this?

(1) http://linux.wxs.ro/2011/08/05/rsync-your-android/

Revision history for this message
Germar (germar) said :
#6

Sorry I don't have any Android experience. On normal Linux boxes I'd put this at the end of '~/.bashrc' or '/etc/profile'. Not sure if Android has a similar file.

Revision history for this message
Simone Gaiarin (simgunz) said :
#7

Ok, now it's working. The dirty solution I've found is to move the ls and chmod bin in /system/bin to ls.orig and chmod.orig to let android only see the ls and chmod bin of busybox.
Thanks for your help!