With Termux, you can ssh into your Android device over Wifi. If there is no Wifi available, you could use your Android device as a Wifi hotspot, connect to it and SSH (you could even use mosh, as others comment that it can be installed in Termux) into your device.<p>I do not know if you can SSH into your device if connected through bluetooth.