SSH Credentials not working despite being validated for given IP

Pranav_Thanedar
Mega Sage

We are trying to discover a Linux Server using SSH Private Key Credentials. I have added the credentials in ServiceNow and tried to validate against the IP address, the credentials are validated.

PranavThaneda1_0-1674621820118.png

 

However, when I try to run quick discovery for the same. I am getting the below errors. 

 

PranavThaneda1_1-1674621998387.png

I am able to Telnet the IP address from host server as well.

 

Any suggestions on what could be the issue would be much appreciated. Thank you in advanced!

 

 

 

4 REPLIES 4

SiD2
ServiceNow Employee
ServiceNow Employee

Hi @Pranav_Thanedar 

 

One quick hunch that striken to me was if the mid being used in both cases is same or not.

 

You can even cross verify it by checking the input payload for the classification phase and it will have a tag with "credential_id" and resp cred sys id.

 

Please mark Helpful / Accept Solution so that it helps others with similar questions.

Hi @SiD2 ,

 

I was able to get it working after Linux team made some changes to the user configured at their end. Apparently just using the public key for discovering is not working. ServiceNow still needs username and password to log in to the system and since we do not provide password while using private key credentials. I am not sure why that is the case as just configuring public key at Linux Servers should work. I am still exploring around the same will provide an update.

 

Thank you for the response though!

SiD2
ServiceNow Employee
ServiceNow Employee

Hi @Pranav_Thanedar 

 

While updating the credential with SSH Private key, password need not be entered and it should work ideally. Check it via command line with same private key if it's working or not from the same mid machine.

 

Please mark Helpful / Accept Solution so that it helps others with similar questions.

Hi @SiD2,

 

Thank you for the inputs, it was a silly issue, the Linux Team had made a mistake while generating and providing the private key and although the credentials I created were SSH private key credentials, the "Type" field was still showing it to be SSH. I created new credential record with correct private key and now the type field is also showing SSH Private Key. It seems to be working fine now. Again, thank you for the inputs.