# SFTP node crashes server, the other one is not working

**URL:** <https://discourse.nodered.org/t/sftp-node-crashes-server-the-other-one-is-not-working/67757>\
**Category:** General\
**Created:** [15 September 2022 16:22 UTC](https://discourse.nodered.org/t/sftp-node-crashes-server-the-other-one-is-not-working/67757 "2022-09-15T16:22:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![smitterer](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smitterer/32/59179_2.png) [@smitterer](https://discourse.nodered.org/u/smitterer)\
**Post date:** [19 September 2022 08:04 UTC](https://discourse.nodered.org/t/sftp-node-crashes-server-the-other-one-is-not-working/67757/4 "2022-09-19T08:04:55Z")

</div>

I'm currently trying to use [scp-promises - npm](https://www.npmjs.com/package/scp-promises) in a function node but had no success yet.

The node-sample imports CreateScpConnection from scp-promises but I wasn't able to do so in the node. (`import { CreateScpConnection } from 'scp-promises'`)  
I'm currently trying around with similar codes from [How to make PDF from HTML - #4 by Steve-Mcl](https://discourse.nodered.org/t/how-to-make-pdf-from-html/67688/4) and [Useage of contrib-npm - #6 by bakman2](https://discourse.nodered.org/t/useage-of-contrib-npm/67449/6) provided by @Steve-Mcl and @bakman2 (things like `const { scpPromises } = new CreateScpConnection("");`) and so on instead of using "import".

Also, I need to find a way to set the path and filename based on msgs.

---

_[View the full topic](https://discourse.nodered.org/t/sftp-node-crashes-server-the-other-one-is-not-working/67757)._
