We’ve been troubleshooting an issue where our SFTP...
# suitescript
r
We’ve been troubleshooting an issue where our SFTP connection using NetSuite’s
N/sftp
module suddenly stopped working with a specific SFTP server. The error is an unexpected SuiteScript error (
UNEXPECTED_ERROR
)
with no additional details. What We Know So Far: Our key ID is valid and working. Login credentials haven’t changed. We can successfully connect to the SFTP servers manually using an SFTP client. The host key type is RSA and matches the expected value. The same script works correctly when connecting to an AWS-hosted SFTP server. What We’ve Tried: 🔹 Including/excluding the
keyType: 'rsa'
option. 🔹 Adding/removing the
directory
property in connection options. 🔹 Using
ssh-keyscan
to verify the correct host key. 🔹 Testing different encryption ciphers and key exchange algorithms. Example Connection Options in NetSuite:
Copy code
const connectionOptions = {
url: '<http://our-sftp-server.com|our-sftp-server.com>', 
hostKey: 'AAAAB3...', 
username: 'our-username',
port: 18765,
keyId: 'our-key-id',
hostKeyType: 'rsa'
};
connection = sftp.createConnection(connectionOptions);
Observations: - The issue seems to only occur with our SiteGround SFTP servers. - AWS-hosted SFTP servers work fine, which suggests NetSuite’s
N/sftp
module isn’t broken globally. - The SiteGround server supports standard encryption ciphers. Has anyone else encountered similar SFTP issues lately? Could there be a change in NetSuite’s SFTP handling or something specific to this server’s SSH settings? Last known date of our SiteGround connection working was Feb 10th, 2025. Any insights would be greatly appreciated! 🙌
a
given the solution is still working for other SFTP servers and was previously working just fine, this doesn't seem like a NS level problem at all. Did SiteGround get setup with a static IP whitelist of NS IPs? if so those are NOT static, and NS could now be using different IPs and so the connection is being refused at the SiteGround end. can you get connection attempt logs from the siteground side? I think that's what you'll need to troubleshoot
r
wooo 😒
1
e
Seems like something they should have informed their clients of
r
You’d have thought!
a
facepalm
r
I guess, does anyone have a good sftp host suggestion that is simple to setup various sub domains on?
e
I'm not quite sure about sub domains since I have not used them but take a look at this: https://www.rebex.net/tiny-sftp-server/ I implemented one customization and it is live, no issues for more than a year.
👍 1