title: Node.js ssh2-sftp-client Error: fastPut: No response from server Local
body: <p>I am using <code>node -v v14.17.0</code> and <code>&quot;ssh2-sftp-client&quot;: &quot;^7.0.0&quot;</code> and method <code>fastPut</code> <a href="https://github.com/theophilusx/ssh2-sftp-client#sec-5-2-9" rel="nofollow noreferrer">https://github.com/theophilusx/ssh2-sftp-client#sec-5-2-9</a></p>
  <p>Checking the remote files is okay, so connection works.</p>
  <p>My environment is <code>wsl2 Ubuntu-20.04</code></p>
  <p>Problem I face is error</p>
  <pre><code>RuntimeError: abort(Error: fastPut: No response from server Local: /home/draganddrop/testi.txt Remote: Downloads/testi.txt). Build with -s ASSERTIONS=1 for more info.
      at process.J (/home/draganddrop/node_modules/ssh2/lib/protocol/crypto/poly1305.js:20:53)
      at process.emit (events.js:376:20)
      at processPromiseRejections (internal/process/promises.js:245:33)
      at processTicksAndRejections (internal/process/task_queues.js:96:32)
  </code></pre>
  <p>I have tried also with <code>sftp&gt; put /home/draganddrop/testi.txt Downloads/testi.txt</code> from console, which works.</p>
  <p>Code I am using:</p>
  <pre><code>        let Client = require('ssh2-sftp-client');
          let sftp = new Client();
      
          let remotePath = 'Downloads/testi.txt';
          let localPath = '/home/draganddrop/testi.txt'
  
          const config = {
            host: 'XX.XX.XXX.XXX',
            port: '22',
            username: 'XXXXX',
            password: 'XXXXXX'
          };
  
          sftp.connect(config)
          .then(() =&gt; {
            sftp.fastPut(localPath, remotePath);
            //return sftp.exists(remotePath);
          })
          //.then(data =&gt; {
          //  console.log(data);          // will be false or d, -, l (dir, file or link)
          //})
          .then(() =&gt; {
            sftp.end();
          })
          .catch(err =&gt; {
            console.error(err.message);
          });
  </code></pre>
  <p>I have no idea what causes this error, I've tried with different paths and get either bad path error or this. What could be the cause?</p>