Modules

filter

 

Objects/Functions

module (N/sftp)

SuiteScript 2.0

SFTP Authentication

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=SFTP Authentication for more information.


Warning: implode(): Invalid arguments passed in /home/web131/public_html/ns/index_include.php on line 90

Example:

// Code Example 1
//...
if(request.method === context.Method.GET){
var form = ui.createForm({title: 'Enter SFTP Credentials'});
var credField = form.addCredentialField({
id: 'custfield_sftp_password_token',
label: 'SFTP Password',
restrictToScriptIds: ['customscript_sftp_script'],
restrictToDomains: ['acmebank.com'],
restrictToCurrentUser: true //Depends on use case
});
credField.maxLength = 64;
form.addSubmitButton();
response.writePage(form);
}
//...

// Code Example 2
//...
var request = context.request;
if(request.method === context.Method.POST){
// Read the request parameter matching the field ID we specified in the form
var passwordToken = request.parameters.custfield_sftp_password_token;
log.debug({
title: 'New password token',
details: passwordToken
});
// In a real-world script, "passwordToken" is saved into a custom field here...
}
//...

// Code Example 3
$ ssh-keyscan -t rsa -p 1234 acme.com
AATpn1P9jB+cQx9Jq9UeZjA1245X7SBDcRiKh+Sok56VzSw==

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4855401415.html