N/sftp SuiteScript Module for Secure File Management
N/sftp SuiteScript module enables secure file transfers and folder management with SFTP servers in NetSuite.
The N/sftp module allows you to manage folders and perform file uploads or downloads from external SSH file transfer (SFTP) servers. It is crucial because it enables seamless data transfers between your NetSuite instance and external platforms, ensuring robust integration with your file management system.
How Does the N/sftp Module Work?
This module is designed specifically for server scripts, facilitating various SFTP operations, which include:
- Establishing connections to remote SFTP servers.
- Uploading and downloading files.
- Managing directories on these servers.
Key Features of the N/sftp Module
- Connection Management: The module provides an
sftp.Connectionobject that represents a connection to a remote FTP server. You can establish this connection using thesftp.createConnection(options)method. - Timeouts: It holds enumerated values for minimum and maximum connection timeouts, as well as port numbers, ensuring that your connections are stable and secure.
- File and Directory Operations: You can perform various operations such as downloading, uploading, creating and removing directories, and listing remote directories using provided methods on the
sftp.Connectionobject.
Important Notes
When using the N/sftp module:
- Wildcards in Paths: Ensure that wildcards like
?and*in paths and filenames are properly escaped unless you intend for them to function as wildcards. - Security: Utilize SSH keys for establishing connections. This approach is safer and is supported by methods in the N/keyControl module, allowing you to manage keys securely within NetSuite.
SFTP Connection Establishment
To establish an SFTP connection, you must utilize SSH keys. This is done via the Private Keys page accessible in NetSuite. Only users with the appropriate permissions can manage these keys. Once set, you can easily integrate SFTP functionality into your scripts.
Who This Affects
- Administrators: Responsible for configuring SFTP settings and managing SSH keys.
- Developers: Who will implement SFTP file transfers in their SuiteScript applications.
Key Takeaways
- The N/sftp module is essential for managing file transfers via SFTP in NetSuite.
- Utilizing secure SSH keys enhances the security of file transfer operations.
- Proper management of paths and escape characters is crucial to avoiding errors during file operations.
Frequently Asked Questions (4)
Is the N/sftp SuiteScript module compatible with both client and server scripts?
Are there specific permissions required to manage SSH keys for SFTP connections in NetSuite?
How are wildcards in paths handled when using the N/sftp module?
What methods are available in the N/sftp module for managing remote directories?
Was this article helpful?
More in Integration
- Loop Returns Integration in NetSuite Connector 2026.1
Updated for NetSuite 2026.1, including enhancements to the Loop Returns integration. Loop Returns Integration in NetSuite Connector 2026.1
- Concurrency Governance Limits in NetSuite SuiteCloud
Concurrency governance limits are determined by NetSuite service tiers and SuiteCloud Plus licenses, impacting integration performance.
- Create Integration Records for OAuth 2.0 in NetSuite 2026.1
In NetSuite 2026.1, administrators can create integration records for applications to use OAuth 2.0, enabling secure access. Here's how.
- Enriched Bank Data Matching Improvements in NetSuite
Enriched Bank Data enhances matching of imported transactions to the general ledger, improving accuracy with AI-generated insights.
Advertising
Reach Integration Professionals
Put your product in front of NetSuite experts who work with Integration every day.
Sponsor This Category