Thanks to visit codestin.com
Credit goes to mlapp.cn

Linux

SSH key configuration

# Generate a SSH key
ssh-keygen
 
# Copy SSH key to remote device
ssh-copy-id [email protected]
 
# Copy SSH key to non 22 port
ssh-copy-id -p 10022 [email protected]

Enable rsync on remote machine

systemctl enable --now rsync

Windows

Generate a SSH key & Copy it to remote machine

## Powershell
# Generate
ssh-keygen
 
# Copy to remote
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh [email protected] "cat >> .ssh/authorized_keys"

Android

Install Magisk Module

https://gitlab.com/d4rcm4rc/MagiskSSH/-/tree/master

Copy the ~/.ssh/id_rsa of current device (PC) to mobile, then copy and rename it to

/data/ssh/root/.ssh/authorized_keys & /data/ssh/shell/.ssh/authorized_keys.

The permission of them are 0600,

User & owner are root:root / shell:shell