Suggest you use SSH to access the box. You’ll also need to use sudo to get elevated privilege when editing rc.local.
See Accessing the command line