Magisk-Modules-Repo / ssh

ssh
177 stars 34 forks source link

Required Directory Permissions & Ownership. #36

Open zack-kyria opened 1 year ago

zack-kyria commented 1 year ago

Besides the permissions of authorized_keys, in my device it was also needed to change the permissions of the parent directories as well as their ownership for the ssh login to work.

More Specifically .ssh and root or shell (depending on which you are going to use).

So we got:

chmod 600 /data/ssh/root/.ssh/authorized_keys
chmod 600 /data/ssh/shell/.ssh/authorized_keys

chown root /data/ssh/root/.ssh/authorized_keys
chown shell /data/ssh/shell/.ssh/authorized_keys
chmod 700 /data/ssh/root/.ssh
chmod 700 /data/ssh/shell/.ssh

chown root /data/ssh/root/.ssh
chown shell /data/ssh/shell/.ssh
chmod 700 /data/ssh/root
chmod 700 /data/ssh/shell

chown root /data/ssh/root
chown shell /data/ssh/shell