First of all let me say that this is not a big deal for pro hackers and network administrators. We are going to control kali linux machine with an Android device using SSH (secure shell) service. SSH protocol allows you to connect to a remote system and interact with shell with highly encrypted communication method. Since this is encrypted, this is the best way to interact with a remote system over an unsecured network. Its a successor of an unsecured remote shell protocol telnet and it replaced protocols like RSH, REXEC and RLOGIN.
SSH use public key cryptographic method to authenticate a remote user which includes two methods. We can use automatically generated keys for authentication much similar to HTTPS protocol but it requires user password. The second method is manually using public-private key pair method. The second method is not much secure as anyone impersonate a user with another pair of keys. Here we are using password authentication method which is easy and safe.
Since it is a client-server method of communication we have to setup server on kali machine and a client application on android. Openssh is the best way to setup server on kali machine. Openssh aka OpenBSD Secure Shell is a bit updated version of normal SSH.Setup server and login with client app called juiceSSH, just follow the steps.
NOTE: Forward port 22 on your router for remote connection over the internet.
Install openSSH server in kali linux.
Download and install juiceSSH from playstore on your android device.
Setup ssh server
After installing ssh server you can configure port, authentication method, key management etc by editing the config file in “/etc/ssh/sshd_config” if you don’t know much about these leave as it is. Use the following command to open config file in gedit text editor
After configuring it start ssh-server with the following command.
Now all you need is the Kali IP address, username and password. here in this case password for “root” is “toor” . Now take your android phone and move on to next step.
Connect to server with Android
- install Juice SSH.
- open it and go to connections.
- Create new ( + button).
- Enter nickname and kali IP address in the address field.
- Create new identity, input any name and input kali machines username in the username field (here its “root”)
- Input the kali machine’s password for that user (here its “toor”)
- Apply everything and back in main menu you can find new connection is created.
- Click on that to connect to Kali linux.
After connecting you can execute all terminal commands with your android phone.
Any doubts or questions? post it on the comment section below. If you like this blog give me a like on facebook and add me on google plus. Subscribe my youtube channel for video tutorials.