For devices using the same macOS, you can allow remote Mac login using a Secure Shell (SSH). This enables Mac remote desktop access using a Secure File Transfer Protocol (SFTP).
To set up Remote Login:
- Go to System Preferences > Sharing
- Select Remote Login.
- Choose which users you want to have remote access or the ability to control your Mac.
You can either select All Users, which means any other device on your network, or any Mac you own, can access and connect, or click the plus sign to pick the exact users.