
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 09:35 PM - edited 12-19-2024 09:36 PM
In ServiceNow, I attempted to connect to a Linux server using the "SSH Private Key Credential," but the connection failed. When validating the credential (Private Key), it returned an "Authentication failed" error.
To troubleshoot, I used an alternative method outside of ServiceNow, such as PuTTY on Windows, to connect to the Linux server with the same "SSH Private Key," and it connected successfully.
I have also tested the connection using "SSH Credential" instead, and the credential was validated successfully. ServiceNow was then able to connect to the Linux server.
Why is ServiceNow unable to connect to the Linux server using the "SSH Private Key Credential"?
Solved! Go to Solution.
- Labels:
-
Discovery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 11:22 PM
Hi everyone, thanks for the responses! I found the solution to the issue, and I wanted to share my approach in case it helps others,
In ServiceNow, the private key must be in OpenSSH format for proper validation. The generated private key in Linux or Windows, need to convert it to OpenSSH format before uploading it to ServiceNow Discovery Credentials.
- Convert the private key from PPK to OpenSSH format:
- Open PuTTYgen (the tool used to generate and manage PPK keys).
- Load the existing PPK private key by clicking "Load" and selecting the PPK file.
- Once the key is loaded, go to Conversions > Export OpenSSH key.
- Save the key in OpenSSH format.
- Upload the OpenSSH-formatted key into Discovery Credential:
- Once the key is converted to OpenSSH format, upload the key into the "SSH Private Key Credential" field in ServiceNow.
- The credential should now be validated correctly, and ServiceNow should be able to establish an SSH connection to the Linux server.
After successfully establishing the connection, I was able to proceed with discovering the Linux server using the SSH Private Key Credential. The connection was authenticated without issues, and the server discovery process completed successfully.
Regards,
Gowthaman J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 11:43 PM
could be a key exchange error that you should be able to see in the agent log or enabled ssh log. Alot of insight to be found there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 11:22 PM
Hi everyone, thanks for the responses! I found the solution to the issue, and I wanted to share my approach in case it helps others,
In ServiceNow, the private key must be in OpenSSH format for proper validation. The generated private key in Linux or Windows, need to convert it to OpenSSH format before uploading it to ServiceNow Discovery Credentials.
- Convert the private key from PPK to OpenSSH format:
- Open PuTTYgen (the tool used to generate and manage PPK keys).
- Load the existing PPK private key by clicking "Load" and selecting the PPK file.
- Once the key is loaded, go to Conversions > Export OpenSSH key.
- Save the key in OpenSSH format.
- Upload the OpenSSH-formatted key into Discovery Credential:
- Once the key is converted to OpenSSH format, upload the key into the "SSH Private Key Credential" field in ServiceNow.
- The credential should now be validated correctly, and ServiceNow should be able to establish an SSH connection to the Linux server.
After successfully establishing the connection, I was able to proceed with discovering the Linux server using the SSH Private Key Credential. The connection was authenticated without issues, and the server discovery process completed successfully.
Regards,
Gowthaman J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi,
I did exactly what is described in the solution, but unfortunately I still get the “test credential” “authentication failed” error. Using Putty, I can access the server without any problems, but unfortunately it doesn't work through ServiceNow.