How to share file with connected ipfs nodes?

I want to upload file on local ipfs and this file should be shared to ipfs node on aws ec2(remote)

There is ipfs-desktop on ec2. And another ipfs-desktop is on some computer.

How to connect ipfs nodes?

Should I follow this docs? Exchange files between nodes | IPFS Docs