Correct ssh public key permissions

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@569 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-02-25 19:52:00 +00:00
parent 420e86d355
commit 8ed1e37aa4

View File

@ -68,7 +68,9 @@ sub process_request {
return;
}
mkpath($tempdir."/root/.ssh");
chmod(0700,$tempdir."/root/.ssh");
copy("/root/.ssh/id_rsa.pub","$tempdir/root/.ssh/authorized_keys");
chmod(0600,"$tempdir/root/.ssh/authorized_keys");
if (-r "$installdir/postscripts/hostkeys/ssh_host_key") {
copy("$installdir/postscripts/hostkeys/ssh_host_key","$tempdir/etc/ssh_host_key");
copy("$installdir/postscripts/hostkeys/ssh_host_rsa_key","$tempdir/etc/ssh_host_rsa_key");