From 229ee3966c1e79b24d28d075e39bd8cdae8f07ac Mon Sep 17 00:00:00 2001 From: SStar1314 <1010133787@qq.com> Date: Tue, 25 Aug 2015 22:25:24 +0800 Subject: [PATCH] Update remoteshell --- xCAT/postscripts/remoteshell | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index 19250d036..fb8124440 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -281,8 +281,7 @@ 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 -t ecdsa -y -f /etc/ssh/ssh_host_ecdsa_key -P "" - if [ "x$?" = "x0" ]; then + 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 chown root /etc/ssh/ssh_host_ecdsa_key.pub