SSH: Difference between revisions

From AsteroidOS
(Copy the 'SSH' page from the current wiki)
 
(Convert code to pre tags)
 
Line 3: Line 3:
= SSH over USB =
= 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:
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:
<code>
<pre>
ssh ceres@192.168.2.15
ssh ceres@192.168.2.15
</code>
</pre>


= SSH over WiFi =
= SSH over WiFi =
Line 11: Line 11:
Dropbear is already running on the watch so we just need to configure an IP address to connect to.
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.
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 <code># ip a show dev wlan0</code>.
Once the setup is done, you can look for the IP address your Router assigned via DHCP, with  
<pre># ip a show dev wlan0</pre>.


= Troubleshooting =  
= Troubleshooting =  


* Using SCP/SSH results in a <code>REMOTE HOST IDENTIFICATION HAS CHANGED!</code> warning
* Using SCP/SSH results in a <code>REMOTE HOST IDENTIFICATION HAS CHANGED!</code> 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: <code> ssh-keygen -R 192.168.2.15 </code>
** 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:  
<pre>ssh-keygen -R 192.168.2.15</pre>

Latest revision as of 22:01, 26 June 2023

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

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