D4rCM4rC / MagiskSSH

17 stars 2 forks source link

Difference between connecting using "ssh shell@<device_ip>" and "ssh root@<device_ip>" #1

Open pwsnla opened 6 years ago

pwsnla commented 6 years ago

This is probably just a case of me not understanding the functionality but I am not able to connect using "ssh shell@". Connection using "ssh root@" works. I placed the same SSH key in both /data/ssh/root/.ssh/authorized_keys and /data/ssh/shell/.ssh/authorized_keys. I have the same permission set on both directories/files.

What is different about connecting as "shell" vs connecting as "root"? is root connection running with root access and "shell" without?

Thank you in advance for clarifying.

D4rCM4rC commented 6 years ago

That is how it should work. Connect using ssh root@<ip> and you will have root access; connect using ssh shell@<ip> and you should have non-root access as user shell.

I'm not sure why login as user "shell" does not work for you. Maybe there is a problem matching the username, uid and home directory. I hope I can find some time in the next couple of weeks to investigate this.

pwsnla commented 6 years ago

Thank you for responding. I will almost always want to use ssh with root access so the fact that connecting with shell does not work is not a big problem for me.

BTW, I also had an issue with sshd service not auto starting on boot. Adding small wait ('sleep 15') in service.sh seemed to fix it. Not sure why, but I got the idea to try it because another Magisk module that I am using had 'sleep 15' in its service.sh with a comment that it was running too early in the boot process.