SSH

From AsteroidOS
Revision as of 13:19, 22 June 2024 by Beroset (talk | contribs) (→‎SSH over USB: added in missing section about using dhclient)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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