Alex confirms that restorecon -F authorized_keys works, so added it to

the documentation.
master
Greg Alexander 4 years ago
parent 2c40b79afb
commit 4ed726b316

@ -1111,7 +1111,7 @@ sort of firewall, it hangs instead of saying connection denied. So maybe
simply doesn't support -R, but I kind of thought it did?
XXX - if the unlink(authorized_keys) fails, or if the open() fails for permission reasons, generate a Toast for the user...and add "restorecon -F authorized_keys" to the FAQ if it works.. SELinux will apparently hide authorized_keys from the app, on LineageOS?
XXX - if the unlink(authorized_keys) fails, or if the open() fails for permission reasons, generate a Toast for the user. (confirmed that restorecon -F authorized_keys works)
XXX - restart the daemon on app upgrade
XXX - why doesn't "ssh -R 2223:192.168.1.254:80 mouse" work?

@ -35,8 +35,11 @@ Port 2222
</pre>
<li> Launch SimpleSSHD, and in Settings enable "Start on Boot", then
manually start it for the first time.
<li> Create <tt>authorized_keys</tt> in the home directory (do not use <tt>ssh-copy-id</tt>)
<li> Optionally make <tt>.profile</tt>
<li> Create <tt>authorized_keys</tt> in the home directory
(do not use <tt>ssh-copy-id</tt>).
<li> Optionally run <tt>restorecon -F authorized_keys</tt> (LineageOS
needs it for "SELinux context").
<li> Optionally make <tt>.profile</tt>.
</ul>
<p>If SimpleSSHD does not find an <tt>authorized_keys</tt> file when a
@ -187,6 +190,12 @@ an SD card through the Android Java API, but shell commands usually use
Unix APIs (POSIX, C). I don't know a work-around. Most phones let you
write to <tt>/sdcard</tt>, but it's often in the phone's internal memory.
<li>If you installed an <tt>authorized_keys</tt> file, but SimpleSSHD
acts like it doesn't exist, try running "<tt>restorecon -F
authorized_keys</tt>". Some Android configurations, such as LineageOS,
run apps in an "SELinux Context" (don't ask me) where that kind of thing
is necessary.
<li> <tt>rsync</tt> will do too much work for an update, because there is
usually no way to update the ctime, mtime, or atime on files in
<tt>/sdcard</tt>. Use <tt>rynsc --size-only</tt>, and it will compare

Loading…
Cancel
Save