Skip to content

Instantly share code, notes, and snippets.

Last active Mar 5, 2021
What would you like to do?
How can I access my Ubuntu phone over ssh? (no `adb shell` required)
# GNU GPL v3 license, (c) 2016 by Alexander Kinne, Peter Bittner
IP_ADDRESS=$(ip addr show primary | grep wlan | grep 'inet ' | sed -e 's/^\s*inet //' -e 's/ brd .*$//' -e 's#/.*##')
echo "Your IP address: $IP_ADDRESS (wlan)"
if [[ "$(android-gadget-service status ssh)" == "ssh enabled" ]]; then
sudo android-gadget-service disable ssh
sudo android-gadget-service enable ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment