Unsolved
This post is more than 5 years old
2 Intern
•
130 Posts
0
140553
December 21st, 2011 04:00
OME / ssh host key linux server
When I try to update a linux server using OME I get the error :
Results: File deploy command failed to execute with error message: The server's host key is not cached in the registry. The system may not be the same.
How can I fix this / where in the registry should I put the host key ?
0 events found
No Events found!


Stephan-thevalley
2 Intern
•
130 Posts
0
January 27th, 2012 08:00
Chris,
I also changed the 3 services.
Did you run the the plink with this user ?
victor_waelchli
91 Posts
0
January 27th, 2012 08:00
so, the issue here it seems is that the user for the OME services must be the same user you login with and manually make the ssh key store for the targets.
putty is looking for the key in HKEY_CURRENT_USER\Software\SimonTatham\Putty\SshHostKeys
which is specific to the user( in this case the service account that OME is attempting to use)
Chris.G
40 Posts
0
January 27th, 2012 09:00
Turns out the last test was caused by me using the hostname in the plink manual run, rather than the IP which was what was used in discovery. I reran plink with the IP rather than host and it worked.
Then I went through and set the services to SYSTEM (deleting the key and putty.rnd) one-by-one to see which was causing the problem. All of the services got set SYSTEM and everything was still fine!
I added another server. It worked fine first time. Who knows that craziness was happening, but it's resolved now. Maybe the services were originally running as local service rather than local system before (I don't remember but I thought it was SYSTEM)?
victor_waelchli
91 Posts
0
January 27th, 2012 10:00
Great News!
jhboricuamn
26 Posts
0
March 21st, 2012 15:00
This is how I solved the issue on my end:
Created a .cmd file with the following code:
@echo off
D:\Admin\Scripts\CMD\plink.exe -l %1 -pw %2 %3 %4 < D:\Admin\Scripts\CMD\yes.txt
Saved this file on a directory inside D:\Admin\Scripts\CMD on my OME server as sshkeys.cmd. In that same directory, saved a copy of plink.exe and also a text file called yes.txt, which only contains the letter y. (You can save this anywhere you choose though I strongly suggest that there are no spaces in the path).
I then created a generic remote command task on OME. On the command line i entered the full path to the sshkeys.cmd batch file:
D:\admin\Scripts\CMD\sshkeys.cmd
On the Arguments line I entered the username, password, $ip OME variable, and the command I want plink to execute, each argument is separated by space:
root password $ip hostname
I then targeted this to a search query that populates only ESX servers.
What this will do is to simply connect via plink to the ESX host and run the hostname command. By using the yes.txt file, the batch command will automatically answer 'y' when prompted to import a ssh host key if it connects to a server that it hasn't connected to before. By targeting this to a search query in OME I ensure that, as new ESX hosts are added/re-added to the environment, all I have to do is run this task on a schedule and it will keep the SSH keys on my registry updated.
DELL-Rob C
4 Apprentice
•
2.8K Posts
0
March 22nd, 2012 07:00
Thanks for this info. Just checking...do you mean $name instead of hostname, or else it seems like you are passing ‘hostname’ to %4 in the file.
thx
Rob
jhboricuamn
26 Posts
0
March 22nd, 2012 07:00
I'm passing the command 'hostname' as argument 4. The arguments being passed are:
%1 - user
%2 - password
%3 - $ip
%4 - command to run on ESX/Linux host. In this case I'm simply the hostname command.
Tomcsi
2 Posts
0
April 23rd, 2012 07:00
Hello,
I try jhboricuamn solution, but I get error If run task. I checked the file path, I don't understand what is the problem.
Results: Command failed with error message: Cannot find command. Check command path and filename.
jhboricuamn
26 Posts
0
April 23rd, 2012 11:00
In the absence of more details on how my method was implemented on your end, such as the ones Rob C is asking, my guess is that there is something wrong on your end. If you'd like more help on automating the collection of the SSH keys, we'll need the answers to Rob questions to start with.
Tomcsi
2 Posts
0
April 23rd, 2012 11:00
The problem solved. This method isn't working, but I connect by putty to all machines, and delete all machines from OME, and inventory again.
DELL-Rob C
4 Apprentice
•
2.8K Posts
0
April 23rd, 2012 11:00
thanks for the post.
A few questions:
- What does the command and arguments being used look like ? (Command parameter + Arguments parameter)?
- Was a command file created?
- What is the path to the command file?
thx
rob
nick-h
25 Posts
0
June 15th, 2012 02:00
I had the same issue trying to update RHEL5 clients from OME. I kept getting:
"The server's host key is not cached in the registry. The system may not be the same".
I've just spent 3 hours on the phone with Dell Support, which included going through this thread. Even though command line toos plink.exe and omreport.exe connected over ssh fine (and I answered 'y' to store the keys) , OME would fail with the above message for remote tasks (as detailed earler in the thread) or system updates.
The workaround we found was to create a "Deply Server Administrator" task. We left the arguments blank so nothing would actually install (I already have OMSA installed on all the clients), and this generated the keys. After that remote tasks and system updates connected and ran successfully.
Our theory is (the guy at Dell is checking) that the ssh keys are stored somewhere in the OME app, and not in putty or plink as they worked OK and hitting 'y' to store the keys made no difference. The only way to generate them seemed to be using the Deploy task. Maybe the software designers assume you are always going to deploy the OMSA software via OME first, which will create the keys so then any subsequent updates or remote tasks will run. In my case OMSA was already installed.
jechoe
2 Posts
0
October 10th, 2012 18:00
In my case, I already installed OMSA first and then I installed OME on Windows Server 2008 R2 Ent. Also I applied plink and no firewall, no iptables and no selinux but I still getting the error message. How can I fix it? :(
nick-h
25 Posts
0
October 11th, 2012 02:00
See my workaround answer above.
"create a "Deply Server Administrator" task. We left the arguments blank so nothing would actually install (I already have OMSA installed on all the clients), and this generated the keys."