title: Login to mac using applescript
body: <p>I wrote a little script to open Safari on a remote machine:</p>
  
  <pre><code>tell application "Safari"
      activate
      set URL of first document to "http://www.stackoverflow.com/"
  end tell
  </code></pre>
  
  <p>I'd run the applescript remotely because I can connect via SSH.</p>
  
  <p>However, if the machine is not physically logged in (ie, I haven't gone up to it and entered my details), nothing happens. Note, I can still connect to the machine using SSH so can still run scripts.</p>
  
  <p>So can I log the machine in remotely using applescript?</p>