SSH Key Import Failure

This is lifted from my question posed in #general channel on the NetSuite Professionals Slack.  Thought I might get a different audience here; if you’ve answered there, don’t worry about it here.

I am having difficulty importing SSH key files into NetSuite.  I get the completely unhelpful “Unexpected Error”.  I used ssh-keygen to create a keyfile and public key with a passphrase; this created a text file with a begin and end tag for type OPENSSH PRIVATE KEY.
Trying to import the file produces “Unexpected error” at the top of the import window immediately on Save.
Some things I’ve tried to overcome this:
  • Changed the passphrase to not have special characters <>),
  • Removed the passphrase completely
  • Tried re-base64 encoding the whole file, over the top of the existing base64 encoding already present (based on a lead I read somewhere)
  • Changing the tag to RSA PRIVATE KEY
  • Using an RSA format instead (new key generation)
  • Converting embedded newline chars to \r\n
All of these produce the same error.  The documentation around this feature is remarkably sparse and doesn’t cover file requirements other than the file is in “PEM format” (which I think the output of ssh-keygen is).
I find that in NetSuite, usually “Unexpected Error” comes from expected numbers containing text, or other data errors.  But without more context, I can’t fix this problem.  Is anyone able and willing to share some insight?

PS Can’t tag anything reasonable here, I’m not gud enuf.

Rookie Asked on October 18, 2021 in Other.
Add Comment
1 Answer(s)

The answer is: the key must be generated with the -m (file format option) as in: “-m PEM”.

It would be nice if NetSuite gave a more helpful error or more thorough documentation, but alas.

Rookie Answered on October 18, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor