title: shell commands dont work on nodejs ssh2
body: <p>I'm using the following library to do: <a href="http://maboiteaspam.github.io/ssh2-utils/" rel="nofollow noreferrer">http://maboiteaspam.github.io/ssh2-utils/</a></p>
  
  <ol>
  <li>Login to altus instance</li>
  <li>Go to a directory.</li>
  </ol>
  
  <p>This is my code:</p>
  
  <pre><code>function postRun(url){
          ssh.runMultiple(server, "sudo docker exec -it abcas /bin/bash", function(err,stdout,stderr,server,conn){
              if(err) console.log(err);
              stdout.on('data', function(data){
                  executeCommands();
  
              });
              stderr.on('data', function(data){
                  console.log(''+data);
              });
              stdout.on('close',function(data){
                  conn.end();
              });
          });
  }
  
  function executeCommands(){
          ssh.runMultiple(server, ['cd /dependencies/scripts'], function(err,stdout,stderr,server,conn){
              if(err) console.log(err);
              stdout.on('data', function(data){
                  ssh.exec(server, 'pwd', function(err,stdout,stderr){
                      if(err) console.log(err);
                  });
              });
              stderr.on('data', function(data){
                  console.log(''+data);
              });
              stdout.on('close',function(data){
                  conn.end();
              });
          });
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>bash: line 0: cd: /dependencies/scripts: No such file or directory</p>
  </blockquote>
  
  <p>I am not sure what I'm doing wrong. I read somewhere that I need to change my shell but looks like I'm in bash already.</p>
  
  <p>What am I missing, please enlighten.</p>