title: mysqldump with ssh connection in shell script
body: <p>I'm using a shell script that opens a ssh connection and creates an sqldump.</p>
  
  <p>But, when I use <code>mysqldump</code> in the shell script it gives me the error:
  "No such file or directory"</p>
  
  <p>This is the line I use:</p>
  
  <pre><code>ssh user@host mysqldump -uusername -hlocalhost -ppassword --all-databases &gt; /home/user/sqlfile.sql
  </code></pre>
  
  <p>The <code>mysqldump</code> works when i use it in an opened ssh connection or at the server in the commandline.</p>
  
  <p>So my question is why do I get the error and why can't I run the mysqldump command in a shell script?</p>