-
download termux-app apk in host.
-
install
termux-app
to target
adb install termux-app.apk
- download termuxsshdsetup.sh script in host
wget https://gist.githubusercontent.com/jimmy947788/e0e45274909c5c31ea9353317b7f59fb/raw/dd84f25542a26dfc74dd881d90d47d4bfa047bd0/termuxsshdsetup.sh
- push
termuxsshdsetup.sh
to target
adb push termuxsshdsetup.sh /sdcard/Download/termuxsshdsetup.sh
- open
Files
app and taptermuxsshdsetup.sh
file
Files > Download > termuxsshdsetup.sh [tap it]
- open
termux
app and execute commands
chmod +x termuxsshdsetup.sh #設定檔案權限可以執行
./termuxsshdsetup.sh #執行
-
下載 ssh key id_ed25519_pixel6_pro
-
連線
ssh -p 8022 -i id_ed25519_pixel6_pro u0_a111@[your_target_ip]
# u0_a111 可以進去termux-app 執行 whoami 查看
- 如果無法連線發生
去手機打開
sh: connect to host [your_target_ip] port 8022: No route to host
termux
手動啟動 ssh serversshd