Open lemmy04 opened 5 years ago
maybe related:
lemmy@akari:~/Work/susebuildservice/home:lemmy04/Telegram> ssh shell@s8 dream2lte:/data/ssh/shell $ su - sh: su: not found
same problem on a Samsung Tab S2 running Android 7 - can login as shell user, can't login as root, can't use su command.
@lemmy04 -- I had the same issue. Restarting the SSH service seemed to have fixed it for me, I'm not sure why. Also, the "opensshd.init" binary to restart the service was not in the location referenced in the README.md.
Fix via ADB :
adb shell
su
/sbin/.magisk/modules/ssh/opensshd.init restart
so how can this be permanently fixed? the restart hasto be done manually after each device restart. Can't really automate backups or anything that way.
any way to have a permanent fix for this? or maybe some "dirty hack" with tasker that would run the restart command after a reboot, and on each connectivity change?
..anyone got any ideas?
..anyone got any ideas?
Maybe... I can login with root, but I have to:
/data/ssh/sshd_config
:
#PermitRootLogin prohibit-password
PermitRootLogin yes
authorized_keys
permissions:
chmod 0600 /data/ssh/authorized_keys
chmod 0600 /data/ssh/root/.ssh/authorized_keys
chmod 0600 /data/ssh/shell/.ssh/authorized_keys
Hello,
Please, connect with adb shell, and check your file if has a the format. I look my public key in authorized_keys files with a space between each charactere. So, it can't working...
Best regard.
Julien
@lemmy04 -- I had the same issue. Restarting the SSH service seemed to have fixed it for me, I'm not sure why. Also, the "opensshd.init" binary to restart the service was not in the location referenced in the README.md.
Fix via ADB :
adb shell
su
/sbin/.magisk/modules/ssh/opensshd.init restart
Thanks !
Changing the /data/adb/modules/ssh/service.sh makes it permament A bit ugly fix, since the path prefix should be a environment variable
#!/system/bin/sh
# Do NOT assume where your module will be located.
# ALWAYS use $MODDIR if you need to know where this script
# and module is placed.
# This will make sure your module will still work
# if Magisk change its mount point in the future
MODDIR=${0%/*}
# This script will be executed in late_start service mode
# [ -f /data/ssh/no-autostart ] || $MODDIR/opensshd.init start (original line)
[ -f /data/ssh/no-autostart ] || /sbin/.magisk/modules/ssh/opensshd.init start
Module is installed, keys are in place, when I try to connect I get:
lemmy@akari:~/Work/susebuildservice/home:lemmy04/Telegram> ssh root@s8 /system/bin/sh: Permission denied Connection to s8 closed.
ssh-ing in as the shell user works tho.