Hi , I am trying to connect to sftp server using s...
# suitescript
a
Hi , I am trying to connect to sftp server using suitescript . I have been provided url , username and password . In suitescript api i found sftp.connection() function which takes url , username,passwordGuid and hostkey . Shall i put password in place of passwordGuid and where can i obtain hostkey from ? is it same as password ? can anyone guide in this regard .
b
expect to suffer a little while trying to get it up and running
you need to create a credential field to store your password in
and you need to use a tool to get the hostkey of the sftp server
n
The link @battk supplied is also the best I've seen to explain the process and some elements of that article I've borrowed to create implementations myself. Once you understand the various moving parts it's not too bad, I'd just say make sure you understand the list of things you can do with the sftp module it's a bit basic.
j
n
yeah but there's no video with calming music on that article 😄
😂 2
a
Thanks @NElliott @Jeremie @battk for helping me out
s
I used that ursus article and am able to get things working inside the suitelet, but once I copy/paste the password guid over to my scheduled script, it's no longer working. Confirmed that the scriptid is correct for the desired script when creating the guid in the suitelet.
solved: if you have the wrong port number, NS will tell you there's a problem with password guid decryption. wat