Posted on:
Last modified:
这里主要是需要在安卓上生成 host key,以及把自己的公钥传到安卓上
dropbearkey -t rsa -f /data/local/dropbear_host_key # 在安卓上生成 key
adb push ~/.ssh/id_rsa.pub /data/local/authorized_keys # 在宿主机把自己的密钥传过去
dropbear -F -E -r /data/local/dropbear_host_key -A -N root -C jk -R /data/local/authorized_keys # 按照给定的 key 启动 dropbear
dropbear -P /data/local/dropbear.pid -r /data/local/dropbear_host_key -A -N root -C jk -R /data/local/authorized_keys # 以 daemon 形式启动 dropbear
需要更改如下代码(svr-chansession.c):
- addnewvar("LD_LIBRARY_PATH", "/system/lib");
+ addnewvar("LD_LIBRARY_PATH", "/system/lib64");
service sshd /system/xbin/dropbear -s
user root
group root
oneshot
试过了,但是没有成功
setprop service.adb.tcp.port 5555
stop adbd
start adbd
Host *
StrictHostKeyChecking no
mount -o remount,rw /system
© 2016-2022 Yifei Kong. Powered by ynotes
All contents are under the CC-BY-NC-SA license, if not otherwise specified.
Opinions expressed here are solely my own and do not express the views or opinions of my employer.
友情链接: MySQL 教程站