How to specify remote credentials to Bash?

I have a Ubuntu machine and I’m trying to sync a local directory with a remote directory. The following command works just fine when executed from a terminal interactively. (Including when n is removed!)

rsync -naui  --exclude '$R*' ./Documents/ /home/me/target/Documents/

The problem is that the terminal I execute from is created by navigating to the remote directory from a Nautilus window, entering the necessary credentials in the popup window and selecting [Open in Terminal] when I arrive. What I want to do is understand how to create the environment that Nautilus provides. The cd part is easy. What I lack is the other command(s) that get me where this prompt indicates I am.

me@LocalMachine:/run/user/1000/gvfs/smb-share:server=foreign,share=rmtsource$

From this prompt and the rsync syntax above, it’s clear my terminal session “knows” enough to grant rsync access to the appropriate remote location while /home/me/. Still correctly puts the data on my local system where I still own them. It’s this Bash ‘environment’ I’m trying to understand how to establish interactively.