ssh链接termux

ssh链接termux

  • 电脑
  • 手机termux

电脑

ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub root@phone /sdcard/

ssh app_128@phone -p 8022

手机termux

apt updata
apt install openssh
sshd -p 8022

ssh='/data/data/com.termux/files/home/.ssh'

mkdir ${ssh}

cat /sdcard/id_rsa.pub >> ${ssh}/authorized_keys

chown -R app_128:app_128 ${ssh}
chmod -R 700 ${ssh}

你可能感兴趣的:(Linux)