1

I have installed kali linux through linux deploy on my android phone. When I try to ssh into the kali linux it asks for password. If I give the password which was entered before installing kali linux then it says "Password incorrect".

I can VNC through that password but can't connect to ssh and also can't get root access.

When I type sudo it says

sudo: PERM ROOT: setresuid(0,-1,-1): Permission denied
sudo: unable to initialize policy plugin.

And also I can’t install any packages through apt-get install. I am new to linux kindly help!!!

enter image description here

0

You need to have an app to disable selinux (or configure this). Beware, this has system wide security implications.

Other cause of trouble is Samsung's Knox. Then there is still a way: Instead of using sudo try su.

su (important!)
cd /data/data/ru.meefik.linuxdeploy/linux/bin ( or Env Directory in LinuxDeploy settings)
./linuxdeploy shell ( there are other options for configuing linuxdeploy)

Source: https://github.com/meefik/linuxdeploy/issues/224

Yet another way: ssh root@localhost.

2
  • 1
    because of the down votes and the delete vote: it would be nice to share arguments. Yes, disabling these mechanisms is not undangerous, but if somebody want to use kali as root on its smartphone he should know the implications (which I descibed). Aug 31 '19 at 12:05
  • thanks @mifritscher it's worked after i updated the Env Directory in Linux deploy. Sep 9 '19 at 7:49
0

its very simple. Whatever you are using termux or terminal emulator, just include the username in ssh command. For linux deploy use this command

ssh [YOUR PHONE IP] -l [USERNAME YOU SPECIFIED]

then it will accept your password. Normally this command looks like this

ssh 127.0.0.1 -l root

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.