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

xCAT provision Sles11.2 will hang-on when excuting remoteshell script

xCAT provision Sles11.2 will hang-on and wait for input passphrase when executing "ssh-keygen -y -f /etc/ssh/ssh_host_ecdsa_key > /etc/ssh/ssh_host_ecdsa_key.pub" command in remoteshell script.

Root Cause: Sles11.2 install openssh-5.1p1-41.57.1 build-in package, and this version openssh don't support ecdsa key type.
So there needs a openssh support check before ecdsa key generation. In remoteshell script, line 283, we will add "ssh-keygen -t ecdsa -y -f /etc/ssh/ssh_host_ecdsa_key -P "" " command and check the result to judge support or not.
This commit is contained in:
SStar1314
2015-08-20 20:57:44 +08:00
parent 22a3be42ee
commit d6df481949

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