[Solved] Getting SSH: CREDENTIAL_FORMAT_INVALID_ERROR

Unimus support forum
Post Reply
Agustafson
Posts: 3
Joined: Sun Sep 04, 2022 4:05 pm

Sun Sep 04, 2022 4:09 pm

Starting yesterday, all of the 140+ devices in my unimus are getting
Authentication:
SSH: CREDENTIAL_FORMAT_INVALID_ERROR

Backing up mikrotiks of various versions from 6.48 to 7.5 running unimus 2.2.4

Any thoughts where to start troubleshooting? No changes to configs, trying to add a device I just configured and deployed so I know the credentials are correct.
Vik@Unimus
Posts: 198
Joined: Thu Aug 05, 2021 6:35 pm

Mon Sep 05, 2022 2:54 pm

One of the possible reasons why this could be happening is that currently we treat this particular error as a trigger to end (with a failure) a whole Discovery if the credential format is invalid. In this case, the error relates to an invalid format of the SSH private key added as a device credential to Unimus. 

If a device in Unimus is set to discover usable credentials (this is set up by default, unless a user binds a set of credentials to a device manually), and this kind of credential is tried before some other set of credentials which would be found working, then the Discovery would fail altogether right after this error is found. This is a behavior we are looking into changing for a Discovery to continue even if this error is encountered, but currently, in some cases, it is possible one could encounter this scenario.

The solution to this issue is to remove this credential with an SSH key from Unimus. To do this, however, you'd need to enable debug logging, check the log to see which credentials caused it, and remove them (whether directly from the database using their internal ID or manually in Unimus, if they can be identified by the username). This can, however, be difficult to do without our help as while it is possible to search the import script and track down the particular INSERT statement for the HSQL database, we'd be happy to assist in making sure only the correct one is removed.

If it doesn't seem like this is your case, feel free to submit a support ticket in our Portal. I will get back to you with the information (debug logs) we would need from you to look closer at the possible cause.
Agustafson
Posts: 3
Joined: Sun Sep 04, 2022 4:05 pm

Sun Sep 11, 2022 9:28 pm

Apologies for the late reply, I did not get a notification of the response. That actually helped me a lot, we only had one credential that had an SSH Key on it and we had added it for testing of our new SSH key deployment process, didn't realize it would completely kill it, now that we know that I was able to delete it and clean up the other credentials and all is good!
Post Reply