From 8ed1e37aa4ec17db4975885cb21a21589a186935 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 25 Feb 2008 19:52:00 +0000 Subject: [PATCH] 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 --- xCAT-server-2.0/lib/xcat/plugins/mknb.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/mknb.pm b/xCAT-server-2.0/lib/xcat/plugins/mknb.pm index b5628b311..c38df2b56 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/mknb.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/mknb.pm @@ -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");