ssh to phone
- Install fdroid on phone.
- Install termux.
- Open fdroid, and run:
1pkg upgrade
2pkg install busybox termux-services openssh openssh-sftp-server
3source $PREFIX/etc/profile.d/start-services.sh
openssh-sftp-server
will mount the phone's file-system, and show you some directories in ~/storage/
.
- Copy your PC's ssh public key to the phone's downloads or somewhere, so you can see it in
~/storage/downloads
. - On the phone:
yes | ssh-keygen
cat $pubkey.pub >> ~/.ssh/authorized_hosts
.- Check its ip address with
ifconfig | grep broadcast
- Check the phone's username with with
whoami
sshd -D
- On the PC:
ssh -p 8022 -l $phone_username $phone_ip