In a bigger piece of AppleScript, I need to mount an SMB share. This works:
tell application "Finder" to mount volume "smb://server/share"
That is, it works without asking questions, from the Script Editor or from a shell running in Terminal (ie.
osascript <my script>).
But when I try to run the same script while connected to the Mac through ssh from another computer, Finder (I suppose) first asks for confirmation with a dialog on the GUI:
You are attempting to connect to the server xxx. Click connect to contine.
How can I avoid this confirmation?