Enable remote access to your Mac

On your Mac, open Sharing preferences, then check ‘Remote Login’.

You can now run

this will allow you to access your Mac from anywhere in the world.