From b608592b082854fe886a114f5b025baee7741e19 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Thu, 17 Dec 2015 10:46:13 -0500 Subject: [PATCH] Remove hostname from known_hosts file after set credentials --- xCAT-server/lib/xcat/plugins/credentials.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/credentials.pm b/xCAT-server/lib/xcat/plugins/credentials.pm index 04c321c60..9a5360db1 100644 --- a/xCAT-server/lib/xcat/plugins/credentials.pm +++ b/xCAT-server/lib/xcat/plugins/credentials.pm @@ -320,6 +320,9 @@ sub process_request @filecontent=(); } } + `logger -t xcat -p local4.info "credentials: remove $client from known_hosts"` ; + system("ssh-keygen -R $client -f /root/.ssh/known_hosts"); + if (defined $rsp->{data}->[0]) { #if we got the data from the file, send the data message to the client xCAT::MsgUtils->message("D", $rsp, $callback, 0);