Discussion:
Error when trying to setup ssh synchronizer with setup wizard
Markus via mobileorg-android
2014-01-19 15:52:49 UTC
Permalink
Hi,

I can't get a connection with the ssh synchronizer. I get an error message
when I run the setup wizard:
'Login failed: Failed to find index file with error: java.io.IOException:
2: No such file'

All necessary org files have been created by emacs (index.org, agendas.org,
checksums.org, mobileorg.org, and my notes.org).
Emacs and the MobileOrg files are on the same Debian Linux machine.
I have played with the location of the files and file permissions without
success.
Basically, ssh connection from mobile phone to the Linux machine is working
with a ssh client (so, no problem with credentials or port).
Both devices are on the same LAN.
Tested with Android 2.3.4 on a Motorola Atrix and Android 4.3 on a Samsung
Galaxy S3, both with MobileOrg version 0.9.13. I always get this error
message.
Don't know what to do anymore.
Any suggestions?
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
mobileorg-android on behalf of Matthew Jones
2014-01-19 18:27:55 UTC
Permalink
how are you entering the path into the program? Are you giving it the path
to the index file or the path to the directory containing the index file?


On Sun, Jan 19, 2014 at 10:52 AM, Markus via mobileorg-android <
Post by Markus via mobileorg-android
Hi,
I can't get a connection with the ssh synchronizer. I get an error message
2: No such file'
All necessary org files have been created by emacs (index.org, agendas.org,
checksums.org, mobileorg.org, and my notes.org).
Emacs and the MobileOrg files are on the same Debian Linux machine.
I have played with the location of the files and file permissions without
success.
Basically, ssh connection from mobile phone to the Linux machine is
working with a ssh client (so, no problem with credentials or port).
Both devices are on the same LAN.
Tested with Android 2.3.4 on a Motorola Atrix and Android 4.3 on a Samsung
Galaxy S3, both with MobileOrg version 0.9.13. I always get this error
message.
Don't know what to do anymore.
Any suggestions?
--
You received this message because you are subscribed to the Google Groups
"mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
Markus via mobileorg-android
2014-01-19 19:46:28 UTC
Permalink
I'm entering the entire path to the index file (including index.org at the
mobileorg-android on behalf of Matthew Jones
2014-01-19 19:53:17 UTC
Permalink
have you tried just giving it the path to the directory containing the
index file? It's been a while since I've looked at this.


On Sun, Jan 19, 2014 at 2:46 PM, Markus via mobileorg-android <
Post by Markus via mobileorg-android
I'm entering the entire path to the index file (including index.org at
the end).
--
You received this message because you are subscribed to the Google Groups
"mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
Markus via mobileorg-android
2014-01-19 20:42:27 UTC
Permalink
Yes, I've tried all this. With and without the file name as well as with
and without leading slash.
When I try it without the file name, it gives an error message that the
entry must point to index.org.
I even have changed the location of the files, e.g. into the ssh root
directory.
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
mobileorg-android on behalf of Matthew Jones
2014-01-19 21:09:23 UTC
Permalink
This is pretty strange as this works well for me and a lot of others are
you go of the full path to the file?
On Jan 19, 2014 3:42 PM, "Markus via mobileorg-android" <
Post by Markus via mobileorg-android
Yes, I've tried all this. With and without the file name as well as with
and without leading slash.
When I try it without the file name, it gives an error message that the
entry must point to index.org.
I even have changed the location of the files, e.g. into the ssh root
directory.
--
You received this message because you are subscribed to the Google Groups
"mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
Markus via mobileorg-android
2014-01-20 12:30:33 UTC
Permalink
Yes, I enter the full path to the file. This is:
Markus via mobileorg-android
2014-01-26 12:50:36 UTC
Permalink
Hi,

I've solved the problem.
It's all about ssh configuration. MobileOrg ssh synchronizer will not work
with the Debian default ssh configuration.


The subsystem for sftp must be changed in /etc/ssh/sshd_config from
'/usr/lib/openssh/sftp-server' to 'internal-sftp'.
The following section at the bottom of sshd_config must be entered in case
the MobileOrg files are located in the home directory tree of a user:

Match Group users
ChrootDirectory /home/%u
ForceCommand internal-sftp


Besides, the file system persmissions must be changed. From ssh root
directory (depending on ssh config), all the way up
in the directory structure to the file systems root ('/') must be owned by
user root.



Markus
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
mobileorg-android+noreply-APn2wQfd3-ZA6DIufwgGLbkKI7IBMNt6NPkBJ5-/
2014-02-06 04:54:27 UTC
Permalink
Post by Markus via mobileorg-android
Hi,
I've solved the problem.
It's all about ssh configuration. MobileOrg ssh synchronizer will not work with the Debian default ssh configuration.
The subsystem for sftp must be changed in /etc/ssh/sshd_config from '/usr/lib/openssh/sftp-server' to 'internal-sftp'.
Match Group users
      ChrootDirectory /home/%u
      ForceCommand internal-sftp
Besides, the file system persmissions must be changed. From ssh root directory (depending on ssh config), all the way up
in the directory structure to the file systems root ('/') must be owned by user root.
Markus
I'm having similar issues. I have been using ssh successfully for months and it just stopped working. I've tried making the internal-sftp change, moving it from a home directory to a root owned /org/mobile directory. Either way, it comes back with auth failed.

Do you have any other suggestions?
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
Markus via mobileorg-android
2014-02-07 18:26:32 UTC
Permalink
This ssh stuff is very strict on directory/file permissions.
Finally I have made a step-by-step approach. Independent of org/MobileOrg,
I first tried to establish a connnection with a ssh client
on the Android device, where the ssh root directory points to the MobileOrg
directory (configured in /etc/ssh/sshd_config).
I always had a tail on /var/log/auth.log.
Now, I have chown'ed all the files in MobileOrg directory to root and group
to users. The group must have r/w permission.
The directories all the way up to file system root needs to be owned by
root.
The rest is configuration of org and MobileOrg.

Did you changed any files or permissions? Did you make an OS update? Maybe
sshd_config has been overwritten during update!
Check sshd_config for duplicate sftp subsystem entries. Only the first one
is valid.

Markus
--
You received this message because you are subscribed to the Google Groups "mobileorg-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobileorg-android+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mobileorg-android-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mobileorg-android.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...