Linux server discovery Error "Unexpected end to SSH terminal connection"

Raghav Sharma
Tera Expert

I am trying to discover Linux servers. But they are not discovering. The credentials are validating correctly when I click test credentials and the ping from Mid server hosting server and Linux Server is also working fine...But Error comes when I execute discovery...2 Error comes with below messages:

Unexpected end to SSH terminal connection
SCP returned unexpected EOF

 

Does anybody knows what could be the issue here? Please let me know

1 ACCEPTED SOLUTION

Raghav Sharma
Tera Expert

Got the solution to this. This error comes sometimes when the Linux Service account has password policy set to expire never to false and password has expired.....That is the reason sometimes the credentials validates fine during testing but discovery fails with this error...

 

The fix is ask the Linux admin person to set the password policy set to expire never to true on that server...Then discovery will work again

View solution in original post

2 REPLIES 2

AJ-TechTrek
Giga Sage
Giga Sage

Hi @Raghav Sharma ,

 

Refer the below which may help you.

 

SCP returned unexpected EOF

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0824406

Unexpected end to SSH terminal connection

 

I would suggest to enabling mid.ssh.use_snc and mid.ssh.debug on your mid servers.

If you have a lot of traffic on your mids, you can set mid.ssh.debug to a list of IPs you're interested in so the amount of debug doesn't swamp you.

 

Then, recreate your issue, turn mid.ssh.debug back off, and look in agent/logs/agent0.log.* to see what happened.

Search for "Using SNC" to see the beginning of a session.

You should see phases of negotiation:

  1. TCP connection / Protocol ID (Generally, a firewall / network connectivity issue or too many credential failures triggered a security response)
  2. kexinit / algorithm negotiation (Generally, the server demands exotic algorithms not supported by the client)
  3. authentication (Bad credentials)
  4. execution of various requests to run commands

Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.

 

Thanks

AJ

Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/

ServiceNow Community Rising Star 2024

 

 

Raghav Sharma
Tera Expert

Got the solution to this. This error comes sometimes when the Linux Service account has password policy set to expire never to false and password has expired.....That is the reason sometimes the credentials validates fine during testing but discovery fails with this error...

 

The fix is ask the Linux admin person to set the password policy set to expire never to true on that server...Then discovery will work again