Linux

SSH key configuration

# Generate a SSH key
ssh-keygen
 
# Copy SSH key to remote device
ssh-copy-id root@192.168.1.1
 
# Copy SSH key to non 22 port
ssh-copy-id -p 10022 root@192.168.1.1

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 root@192.168.123.112 "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