From 745cf10422f66cfedee5ccec1a5abcae338a58ac Mon Sep 17 00:00:00 2001 From: SStar1314 <1010133787@qq.com> Date: Wed, 2 Sep 2015 09:20:28 +0800 Subject: [PATCH] Add comments to the remoteshell ecdsa key generate produrce. --- xCAT/postscripts/remoteshell | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index fb8124440..bc56b49a7 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -281,6 +281,10 @@ 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 + # Because of openssh version differs, provisioning errors may happen when MN support ecdsa while CN don't ecdsa. + # Judge CN support ecdsa or not. "-t ecdsa" indicate the key type, "-P "" " avoid hang-on and wait for input passphrase when CN don't support ecdsa. + # If ture, means support ecdsa, then generate corresponding key.pub. + # If false, remove ssh_host_ecdsa_key useless file, to avoid future errors. if ssh-keygen -t ecdsa -y -f /etc/ssh/ssh_host_ecdsa_key -P "" &>/dev/null ; 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