2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-28 00:45:59 +00:00

Merge pull request #1 from SStar1314/SStar1314-patch-1

xCAT provision Sles11.2 will hang-on when excuting remoteshell script
This commit is contained in:
SStar1314
2015-08-24 10:27:39 +08:00

View File

@ -281,9 +281,14 @@ if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then
if ! grep "PRIVATE KEY" /etc/ssh/ssh_host_ecdsa_key > /dev/null 2>&1 ; then
rm /etc/ssh/ssh_host_ecdsa_key
else
ssh-keygen -y -f /etc/ssh/ssh_host_ecdsa_key > /etc/ssh/ssh_host_ecdsa_key.pub
chmod 644 /etc/ssh/ssh_host_ecdsa_key.pub
chown root /etc/ssh/ssh_host_ecdsa_key.pub
ssh-keygen -t ecdsa -y -f /etc/ssh/ssh_host_ecdsa_key -P ""
if [ "x$?" = "x0" ]; then
ssh-keygen -y -f /etc/ssh/ssh_host_ecdsa_key > /etc/ssh/ssh_host_ecdsa_key.pub
chmod 644 /etc/ssh/ssh_host_ecdsa_key.pub
chown root /etc/ssh/ssh_host_ecdsa_key.pub
else
rm -fr /etc/ssh/ssh_host_ecdsa_key
fi
fi
else
#This is an error message