diff --git a/NOTES b/NOTES index 96c18b7..e1c707a 100644 --- a/NOTES +++ b/NOTES @@ -621,9 +621,30 @@ READ_EXTERNAL_STORAGE, so long as I explicitly request WRITE_EXTERNAL_STORAGE. -XXX - make sure to create the app-private files/ on first startup -XXX - add options menu "copy app-private path", or something -XXX - change default from /sdcard/ssh to app-private/files for new installs, or something +May 19, 2018. + +Michael Mess wrote to let me know that he can't use authorized_keys file +because the /sdcard/ssh/authorized_keys file is group-readwritable. I +know regular OpenSSH on a PC does complain if the authorized_keys file is +world-writable, so this made sense to me. He says it is a security flaw, +but really, it is not, because any app that can run code and write to +/sdcard/ssh already has all of the permissions that SimpleSSHD has +(except network, but whatever) -- it isn't escalation, just a horizontal +spreading. + +He suggested moving the SSH config into app-private, which is something +I've been toying with anyways. + +So after some internal debate, I decided to do two changes: + + * add "Copy app-private path" to the options menu, which brings up a + dialog showing the app-private path, with an option "Copy" to put it + in the clipboard. + * make the default for new installs for "home" and "path" be the + app-private dir + +I look forward to seeing if anyone complains about it. + XXX - upgrade project.properties to android-26 XXX - call checkSelfPermission/requestPermission to get WRITE_EXTERNAL_STORAGE diff --git a/doc/index.html b/doc/index.html index 077757f..fd55971 100644 --- a/doc/index.html +++ b/doc/index.html @@ -29,8 +29,8 @@ Port 2222
  • Launch SimpleSSHD, and in Settings enable "Start on Boot", then manually start it for the first time. -
  • Create /sdcard/ssh/authorized_keys -
  • Optionally make /sdcard/ssh/.profile +
  • Create authorized_keys in the home directory +
  • Optionally make .profile

    If SimpleSSHD does not find an authorized_keys file when a @@ -45,6 +45,15 @@ file.

    is supported. If you screw up your authorized_keys file, use the options menu (upper right) -> Reset Keys.

    +

    The default home directory is now the app-private directory, which +will generally be something like +/data/data/org.galexander.sshd/files, but may vary depending on +your device. Use options menu -> Copy App-private Path to view the path +or copy it onto the clipboard. A nice feature of the app-private +directory is it generally supports the full range of Unix of file +permissions, including execute! A disadvantage is that these files all +disappear if you uninstall SimpleSSHD.

    +

    Once you get setup, you may want BusyBox. Check out SimpleBusyBox.

    @@ -77,8 +86,10 @@ and then click "QUIT" when you are done. greater than 1024 (because SimpleSSHD does not have root).
    SSH Path
    -
    Path for general dropbear files, which defaults to -/sdcard/ssh. Most importantly, this is where +
    Path for general dropbear files, which now defaults to +the app-private directory (usually something like +/data/data/org.galexander.sshd/files). +Most importantly, this is where authorized_keys is found. It is also where host keys wind up (they are created on demand), and where temporary files go. This path should probably be under /sdcard.
    @@ -106,8 +117,9 @@ SuperSU.
    Home Directory
    The login shell's home directory, which also defaults -to /sdcard/ssh. This is where your ssh session starts out, and is -where .profile will be found if it is present.
    +to the app-private directory. +This is where your ssh session starts out, and is where .profile +will be found if it is present.
    Extra Commandline
    You can specify additional commandline options for dropbear server. @@ -158,6 +170,8 @@ harmless.

    Change Log