-
-
Save clevertonh/93c4d2ab604a567da47453c655f09eba to your computer and use it in GitHub Desktop.
Revisions
-
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 10 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,27 +4,29 @@ Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running ``` adb install ~/Downloads/Termux_v0.73_apkpure.com.apk ``` Then locate the app and run it ## Install and run SSH Server Next, run the following commands inside the Termux using the on device keyboard to type. When the setup asks for permission, always choose default option, you can just hit/tap enter on the keyboard, dont let it modify any configs ``` pkg install root-repo pkg upgrade pkg install openssh ``` Now, set a password for the current user by running ```passwd```, remember this password you will need it later Then, Start the SSH server inside by running ```sshd```, do not close/exit the app after running the command ## Connect to SSH Server On the pc terminal run the following, dont use ```root@``` as prefix to the ip address ``` ssh <ip address of android device> -p 8022 ``` When asked for password, enter the password you used in the steps above This will drop you into a shell where you can do further installs using ```pkg install <name>``` or run any other command you would like ```wget, curl``` you get a proper linux shell, sweet, enjoy! -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 13 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,25 +1,24 @@ # Connecting to an Android device over SSH ## Initial Setup Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running ```adb install ~/Downloads/Termux_v0.73_apkpure.com.apk``` Then locate the app and run it ## Install and run SSH Server Next, Run the following commands inside the Termux using the on device keyboard to type, ``` pkg install root-repo pkg upgrade pkg install openssh ``` When the setup asks for permission, always choose default option, you can just hit/tap enter on the keyboard, dont let it modify any configs Now set a password for the current user by running ```passwd```, remember this password you will need it later Start SSH server inside android by running ```sshd```, do not close/exit the app after running the command ## Connect to SSH Server On the pc terminal run the following, dont use ```root@``` as prefix to the ip address -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,4 +46,4 @@ then connect again There are instances when the pc to android ip connection will wait a long time. If so, first check if you can ping the android's ip address, and if its not pingable, perhaps reboot the android device. Stating the obvious here, unless the android cant be pinged you cant ssh into it. ## Reference Extracted from Termux's wiki on this topic from here [https://wiki.termux.com/wiki/Remote_Access] it describes alternate ways using Dropbear, Mosh and RSync -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ 2. Then run the app inside the android device, locate and tap on it ## Install and run SSH Server 1. Run the following commands inside the Termux using the on device keyboard to type, ``` pkg install root-repo @@ -21,7 +21,7 @@ When the setup asks for permission, always choose default option, you can just h 3. Start SSH server inside android by running ```sshd```, do not close/exit the app after running the command ## Connect to SSH Server On the pc terminal run the following, dont use ```root@``` as prefix to the ip address ``` ssh <ip address of android device> -p 8022 @@ -30,7 +30,7 @@ When asked for password, enter the password you used in the steps above This will drop you into a shell where you can do further installs using ```pkg install <name>``` or run any other command you would like ```wget, curl``` you get a proper linux shell, sweet, enjoy! ## Stop SSH Server Once you are done working with the shell, stop the ssh server by running ```pkill sshd``` on the device ## Troubleshooting -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,5 +45,5 @@ then connect again ### Waiting forever to connect There are instances when the pc to android ip connection will wait a long time. If so, first check if you can ping the android's ip address, and if its not pingable, perhaps reboot the android device. Stating the obvious here, unless the android cant be pinged you cant ssh into it. ## Reference Extracted from Termux's wiki on this topic from here [https://wiki.termux.com/wiki/Remote_Access] -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,24 +9,26 @@ 2. Then run the app inside the android device, locate and tap on it ## Install and run SSH Server on Android Device 1. Run the following commands inside the Termux using the on device keyboard to type, ``` pkg install root-repo pkg upgrade pkg install openssh ``` When the setup asks for permission, always choose default option, you can just hit/tap enter on the keyboard, dont let it modify any configs 2. Now set a password for the current user by ```passwd```, remember this password you will need it later 3. Start SSH server inside android by running ```sshd```, do not close/exit the app after running the command ## Connect to SSH Server running on Android Device On the pc terminal run the following, dont use ```root@``` as prefix to the ip address ``` ssh <ip address of android device> -p 8022 ``` When asked for password, enter the password you used in the steps above This will drop you into a shell where you can do further installs using ```pkg install <name>``` or run any other command you would like ```wget, curl``` you get a proper linux shell, sweet, enjoy! ## Disconnect and stop SSH Server on Android Device Once you are done working with the shell, stop the ssh server by running ```pkill sshd``` on the device -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 18 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,39 +1,47 @@ # Connecting to an Android device over SSH ## Initial Setup 1. Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it, can be done quickly using ``` adb install ~/Downloads/Termux_v0.73_apkpure.com.apk ``` 2. Then run the app inside the android device, locate and tap on it ## Install and run SSH Server on Android Device 1. Run the following commands inside the app, use the on device keyboard, (choose default option when asked question, just hit enter) ``` pkg install root-repo pkg upgrade pkg install openssh ``` 2. Set a password for the current user by ```passwd```, remember this password you will need it later 3. Start SSH server inside android by running ```sshd```, do not close/exit the app after running the command ## Connect to SSH Server running on Android Device 1. On the pc terminal run the following, dont use ```root@``` as prefix to the ip address ``` ssh <ip address of android device> -p 8022 ``` 2. This will drop you into a shell where you can do further installs using ```pkg install <name>``` or run any other command you would like ```wget, curl``` you get a proper linux shell, sweet, enjoy! ## Disconnect and stop SSH Server on Android Device Once you are done working with the shell, stop the ssh server by running ```pkill sshd``` on the device ## Troubleshooting ### Host key verification error If for some odd reason you are getting Host key verification failed error, run the following first ``` ssh-keygen -R <ip address of android device> ``` If it still gives you trouble edit ```~/.ssh/known_hosts```, locate the line(s) with the ip address and delete it and then connect again ### Waiting forever to connect There are instances when the pc to android ip connection will wait a long time. If so, first check if you can ping the android's ip address, and if its not pingable, perhaps reboot the android device. Stating the obvious here, unless the android cant be pinged you cant ssh into it. ### Reference Extracted from Termux's wiki on this topic from here [https://wiki.termux.com/wiki/Remote_Access] -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,11 +26,13 @@ 8. Once you are done working with the shell, stop the ssh server by running ```pkill sshd``` on the device --- ## SSH not connecting If for some odd reason you are getting Host key verification failed error, run the following first ``` ssh-keygen -R <ip address of android device> ``` If it still gives you trouble edit ```~/.ssh/known_hosts```, locate the line(s) with the ip address and delete it and then connect again --- -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,11 +23,14 @@ 7. This will drop you into a shell where you can do further installs using ```pkg install <name>``` or run any other command you would like ```wget, curl``` you get a proper linux shell, sweet, enjoy! 8. Once you are done working with the shell, stop the ssh server by running ```pkill sshd``` on the device --- 1. If for some odd reason you are getting Host key verification failed error, run the following first ``` ssh-keygen -R <ip address of android device> ``` 2. If it still gives you trouble edit ```~/.ssh/known_hosts```, locate the line(s) with the ip address and delete it and then connect again --- -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ ssh <ip address of android device> -p 8022 ``` 7. This will drop you into a shell where you can do further installs using ```pkg install <name>``` or run any other command you would like ```wget, curl``` you get a proper linux shell, sweet, enjoy! 8. If for some odd reason you are getting Host key verification failed error, run the following first ``` -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ ssh <ip address of android device> -p 8022 ``` 7. This will drop you into a shell where you can do further installs using ```pkg install <name>``` or run any other command you would like ```wget, curl``` you get a proper linux shell, enjoy! 8. If for some odd reason you are getting Host key verification failed error, run the following first ``` -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,4 +30,5 @@ If it still gives you trouble edit ```~/.ssh/known_hosts```, locate the line(s) with the ip address and delete it and then connect again --- Extracted from Termux's wiki on this topic from here [https://wiki.termux.com/wiki/Remote_Access] -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,4 +28,6 @@ ssh-keygen -R <ip address of android device> ``` If it still gives you trouble edit ```~/.ssh/known_hosts```, locate the line(s) with the ip address and delete it and then connect again Extracted from [https://wiki.termux.com/wiki/Remote_Access] -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 2 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,12 +14,9 @@ 4. Set a password for the current user by ```passwd```, remember this password you will need it later 5. Start SSH server inside android by running ```sshd```, do not close/exit the app after running the command 6. On the pc terminal run the following, dont use ```root@``` as prefix to the ip address ``` ssh <ip address of android device> -p 8022 ``` -
raveenb renamed this gist
Oct 23, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 15 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,26 +2,33 @@ ``` adb install ~/Downloads/Termux_v0.73_apkpure.com.apk ``` 2. Then run the app inside the android device, locate and tap on it 3. Run the following commands inside the app, use the on device keyboard, (choose default option when asked question, just hit enter) ``` pkg install root-repo pkg upgrade pkg install openssh ``` 4. Set a password for the current user by ```passwd```, remember this password you will need it later 5. Start SSH server inside android by running, do not close the app after running the command ``` sshd ``` 6. On the pc terminal run the following, dont use root@ as prefix to the ip address ``` ssh <ip address of android device> -p 8022 ``` 7. This will drop you into a shell where you can do further installs using ```pkg install <name>``` 8. If for some odd reason you are getting Host key verification failed error, run the following first ``` ssh-keygen -R <ip address of android device> ``` If it still gives you trouble edit ```~/.ssh/known_hosts```, locate the line(s) with the ip address and delete it and then connect again -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,24 +2,24 @@ ``` adb install ~/Downloads/Termux_v0.73_apkpure.com.apk ``` 1. Then run the app inside the android device 1. Run the following commands inside the app, choose default option when asked question, just hit enter ``` pkg install root-repo pkg upgrade pkg install openssh ``` 1. Set a password for the current user by ```passwd```, remember this password you will need it later 1. Start SSH server inside android by running, do not close the app after running the command ``` sshd ``` 1. On the pc terminal run the following, dont use root@ as prefix to the ip address ``` ssh <ip address of android device> -p 8022 ``` 1. This will drop you into a shell where you can do further installs using ```pkg install <name>``` 1. If for some odd reason you are getting Host key verification failed error, run the following first ``` ssh-keygen -R <ip address of android device> ``` -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 11 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,22 +2,26 @@ ``` adb install ~/Downloads/Termux_v0.73_apkpure.com.apk ``` 3. Then run the app inside the android device 4. Run the following commands inside the app, choose default option when asked question, just hit enter ``` pkg install root-repo pkg upgrade pkg install openssh ``` 5. Set a password for the current user by ```passwd```, remember this password you will need it later 6. Start SSH server inside android by running, do not close the app after running the command ``` sshd ``` 7. On the pc terminal run the following, dont use root@ as prefix to the ip address ``` ssh <ip address of android device> -p 8022 ``` 8. This will drop you into a shell where you can do further installs using ```pkg install <name>``` 9. If for some odd reason you are getting Host key verification failed error, run the following first ``` ssh-keygen -R <ip address of android device> ``` 10. If it still gives you trouble edit ```~/.ssh/known_hosts```, locate the line(s) with the ip address and delete it and then connect again -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ 1. Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it, can be done quickly using ``` adb install ~/Downloads/Termux_v0.73_apkpure.com.apk ``` 3. Then run the app inside the android device 4. Run the following commands inside the app ``` pkg install root-repo pkg upgrade pkg install openssh ``` 5. Set a password for the current user by running, remember this password you will need it later passwd 6. Start SSH server inside android by running -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,12 @@ 1. Install Android App Termux from APKPure or AppStore. 2. If the app exists, just delete and re-install it, can be done quickly using ``` adb install ~/Downloads/Termux_v0.73_apkpure.com.apk ``` 3. Then run the app inside the android device 4. Run the following commands inside the app pkg install root-repo pkg upgrade pkg install openssh -
raveenb revised this gist
Oct 23, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ 1. Install Android App Termux from APKPure or AppStore. 2. If the app exists, just delete and re-install it, can be done quickly using ```adb install ~/Downloads/Termux_v0.73_apkpure.com.apk``` 3. Then run the app inside the android device 4. Run the following commands inside the app pkg install root-repo -
raveenb created this gist
Oct 23, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ 1. Install Android App Termux from APKPure or AppStore. 2. If the app exists, just delete and re-install it, can be done quickly using adb install ~/Downloads/Termux_v0.73_apkpure.com.apk 3. Then run the app inside the android device 4. Run the following commands inside the app pkg install root-repo pkg upgrade pkg install openssh 5. Set a password for the current user by running, remember this password you will need it later passwd 6. Start SSH server inside android by running sshd 7. On the pc terminal run the following, dont use root@ as prefix to the ip address ssh <ip address of android device> -p 8022 8. This will drop you into a shell where you can do further installs using pkg install <name> 9. If for some odd reason you are getting Host key verification failed error, run the following first ssh-keygen -R <ip address of android device> 10. If it still gives you trouble edit ~/.ssh/known_hosts, locate the line(s) with the ip address and delete it and then connect again