终于在手机上自己启动了sshd服务器,然后自定义了别名

手机使用的是CM13,于是打开wifi debug,adb连上去后传上去配置好的sshd_config,

最后执行 '/system/bin/sshd -f /storage/3130-3635/Download/ssh/sshd_config_phone' 启动sshd服务。


1.  below is the alias I have added to my phone on Android 6:

find below by "grep alias /system/etc/mkshrc" or "alias"

alias ls=/system/xbin/ls

alias ll='/system/xbin/ls -l'

alias la='/system/xbin/ls -al'

alias netlist='netstat -atlp'

alias psg=' ps|grep -i'

alias sshserver='/system/bin/sshd -f /storage/3130-3635/Download/ssh/sshd_config_phone'

alias sshp='sshserver'

alias confv='vim /system/etc/mkshrc'

alias df='df -h'

alias ll='ls -lt'

alias sync='sync;sync;echo 3 > /proc/sys/vm/drop_caches'

alias free='free -m'

2. before I could edit above alias file, I run "mount -o remount,rw /system" to remount the system as editable.

3. ssh服务启动后,命令行ssh 192.168.1.48 -p22登录进去,发现好慢。

关闭了adb 网络调试后,立马快多了!

你可能感兴趣的:(终于在手机上自己启动了sshd服务器,然后自定义了别名)