From d095c0fc5f0dc344aaac36af8949545215b3229a Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 19 Mar 2013 13:35:59 +0000 Subject: [PATCH] Have sshd directory contain public keys, as some pieces of software are expecting, whether they should or not git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15580 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/remoteshell | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index 303cabb05..e23ff6ffa 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -77,6 +77,10 @@ if [ $? -ne 0 ]; then chmod 600 /etc/ssh/ssh_host_dsa_key if ! grep "PRIVATE KEY" /etc/ssh/ssh_host_dsa_key > /dev/null 2>&1 ; then rm /etc/ssh/ssh_host_dsa_key + else + ssh-keygen -y -f /etc/ssh/ssh_host_dsa_key > /etc/ssh/ssh_host_dsa_key.pub + chmod 644 /etc/ssh/ssh_host_dsa_key.pub + chown root /etc/ssh/ssh_host_dsa_key.pub fi else #the message received is an error, so parse it @@ -104,6 +108,10 @@ if [ $? -ne 0 ]; then chmod 600 /etc/ssh/ssh_host_rsa_key if ! grep "PRIVATE KEY" /etc/ssh/ssh_host_rsa_key > /dev/null 2>&1 ; then rm /etc/ssh/ssh_host_rsa_key + else + ssh-keygen -y -f /etc/ssh/ssh_host_rsa_key > /etc/ssh/ssh_host_rsa_key.pub + chmod 644 /etc/ssh/ssh_host_rsa_key.pub + chown root /etc/ssh/ssh_host_rsa_key.pub fi else #This is an error message