- Install the "SimpleSSHD" app on your phone (form the Google Play Store).
- Copy your PUBLIC ssh key (form your computer) to the "/sdcard/ssh" (default) folder on your phone and rename it
authorized_keys
. - Run the "SimpleSSHD" app and click start (uses port 2222 be default since it runs in user space). The app will tell you the IP address of the phone.
- SSH in to your phone by issuing:
You will need to issuessh -o StrictHostKeyChecking=no -p 2222 -i <private key location> <phone ip address>
StrictHostKeyChecking=no
the first time only. - To avoid having to type all of this out every time you can add a section to the ssh config file (
~/.ssh/config
).
and simply runHost pixel Hostname 192.168.42.129 Port 2222 IdentityFile ~/.ssh/pixel
ssh pixel
to connect.
Sunday, July 2, 2017
Ubuntu - SSH in to Android Phone (Google Pixel)
The ability to SSH in to your (unrooted) Android Phone is a very powerful one to have, and it is surprisingly simple.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment