title: How to execute a Bash alias over ssh
body: <p>Here's what I'm trying to do:</p>
  
  <pre><code>ssh andy@&lt;ip_address&gt; "cat .bash_aliases; sayhello"
  </code></pre>
  
  <p>Here's what happens:</p>
  
  <pre><code>alias sayhello="echo hello"
  bash: sayhello: command not found
  </code></pre>
  
  <hr>
  
  <p>To be more specific about my problem I'm trying to invoke the command<br>
  <code>"sudo etherwake -i eth0 &lt;mac_address&gt;"</code> over ssh -- this executes (I think) on my local computer, giving a <code>sudo: unable to resolve host [blabla]</code> error.  It seems like any commands that are not standard bash commands are parsed by my local machine.  </p>
  
  <p>If that's what's happening, how do I get around it?  If not, what <em>is</em> the explanation?</p>