SSH Private Key Credentials not working , Even though given the correct SSH Private key that got generated. getting the error "Adding target to blacklist. No valid credential found for types [SSH Password,SSH Private Key]"

krishna26
Kilo Expert

Hello Everyone,

To use in a custom SSH Activity, have created a SSH Private key credential by giving SSH Private Key that belongs to particular server.

I have created the SSH Private key Credential by following the below steps

1. By accessing the corresponding server, generated the corresponding RSA Private key along with the passphrase.

2. Opened the SSH Private Key Credential form, gave the encrypted Private key in the SSH Private Key field, Name of the Credential and saved the form (the Passphrase & Passwords fields got auto-populated).

3. When i am testing the credentials i am getting the error "Adding target to blacklist.  No valid credential found for types [SSH Password,SSH Private Key]" .

I seriously don't know what mistake have i done here !!!

On the other hand, created a SSH Credential record by filling the name, username & password fields. When tested the credential , i could see they are validated. 

I am attaching the screen shots of the respective credential forms & the corresponding ECC output & input queue records as reference.

Any help on rectifying this error would be greatly thankful.

 

Thanks & Regards,

Vamsi Krishna

1 ACCEPTED SOLUTION

Should authenticate the Private key created (copy the Public Key to authorized_keys)& Password Authentication in the Server should be no, then we the SSH Private Key Credential works

View solution in original post

8 REPLIES 8

tim_broberg
ServiceNow Employee
ServiceNow Employee

Start by looking at the ecc_queue input. SSHCommand will output some credential debug input there.

This should include a list of credentials tried. Is it empty?

Are there any credential tags? If so, do they match with what's on the credential?

If all else fails, add a parameter to the probe or the ecc_queue output record, debug = true. This will pour detailed ssh debug information into the mid server's agent log. This may show oddities like the server disconnecting after a few login attempts.
    - Tim.

Hi,

I have not made password authentication false in the server earlier, after doing that now i am able to access the server using the SSH private key credential without any issues .

Thanks & Regards,

Vamsi Krishna

Should authenticate the Private key created (copy the Public Key to authorized_keys)& Password Authentication in the Server should be no, then we the SSH Private Key Credential works

Thanks for the update, Krishna.

Yes, the other two steps I forgot would be:

  1. Try to do by hand the way you think the mid server should be doing. Does it work?
  2. Set the loglevel on the server to verbose, debug, or even debug3 to see what is going on from the server's perspective.

    - Tim.