SSH Connection Error while deploying SCOM agent


While running Discovery Wizard on a RHEL machine several machines reported the following error:

SSH Connection error

SSH Connection error



I’ve tried looking this error in the “Troubleshooting UNIX/Linux Agent Discovery in System Center 2012 – Operations Manager” article, but could not find it there.

I showed this error to the local Linux expert and he asked me what was command that the SCOM is running – notice the error says “Command not found”.

At this point I decided to turn on Cross-Platform logging using the method described in this article.

Just open up command prompt on the computer you’re running discovery from and type:

COPY /Y NUL %windir%\TEMP\EnableOpsMgrModuleLogging

This will create several log files in the Temp folder, one of which called SSHCommandProble.log.

Once I ran the discovery again and got the same error, I looked in the log file and noticed it calls a script called That script is located in the <install dir>\Operations Manager\Server\AgentManagement\UnixAgents folder.




I opened the script for editing with my Linux expert by my side and we started debugging the script. We noticed the script was failing while running the following command:

# Try to find -release file

if [ -z ${ReleaseFile} ]; then

ReleaseFile=`ls -F ${EtcPath}/*-release 2&gt;/dev/null | grep -v lsb-release |grep -v release@| grep -v scx-release| sed -n '1p'`


At that point my Linux expert identified the source of the issue immediately – there was a problem with the configuration of the ‘nsswitch.conf’ file. Apparently the root user was configured for a TCSHELL login instead of BASH login.

At this point I must stop and say that I have no clue whatsoever what is TCSHELL, what is BASH and why does it matter to SCOM! anyways….

To solve this issue, we had to modify the local ‘nsswitch.conf’ file:

Open the file for edition using the following command – vi /etc/nsswitch.conf

Locate “passwd:” section and make sure that “files” is right before “nis”:




If you need to change that, you can do that from the vi editor – use the vi cheat sheet to learn how to use the editor.

Once we fixed that the Discovery Wizard completed successfully!


Incoming search terms:

  • scom 2012 discover centos server ssh connection error
  • ssh connection error
  • ssh scom

What do you think about this post?