SSH
By default, you can get a remote shell on you smartwatch with SSH over RNDIS. On some smartwatches, it is also possible to use SSH with Wi-Fi.
SSH over USB
USB Moded already set up udhcpd so that your watch gets the 192.168.2.15 IP address on its rndis interface. You can then connect to your watch from your computer with the following command:
ssh ceres@192.168.2.15
If your computer does not automatically get an IP address for its rndis interface, you might need to run this first:
sudo dhclient -v enp0s20f0u8
SSH over WiFi
Dropbear is already running on the watch so we just need to configure an IP address to connect to. The IP Connection page describes how to set up Wi-Fi. Once the setup is done, you can look for the IP address your Router assigned via DHCP, with
# ip a show dev wlan0
.
Troubleshooting
- Using SCP/SSH results in a
REMOTE HOST IDENTIFICATION HAS CHANGED!warning- This means that there is already a different device known with the same IP adress. This happens if you reinstall AsteroidOS or you use multiple watches. The warning can be resolved by removing the record of the IP adress from the list of known hosts as follows:
ssh-keygen -R 192.168.2.15
ADB
Some watches have a known issue with the SSH implementation that prevents a working SSH connection. On these devices, ADB (Android Debug Bridge) is the only available shell access method.
ADB can also be used as a straightforward alternative to SSH on any supported watch, and provides equivalent root shell access.
Enabling ADB
ADB and SSH are both enabled and disabled individually in Settings > USB. Selecting Charging only disables both. The toggle takes effect immediately without a restart.
Connecting
With ADB enabled and the watch connected over USB, open a shell with:
adb shell
This gives you a root shell equivalent to ssh root@192.168.2.15.
Multiple watches
When more than one watch is connected, ADB assigns each device a port. List all connected devices and their ports with:
adb devices
Connect to a specific watch by passing its port with the -s flag:
adb -s <port> shell