summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2008-05-17 20:09:15 +0000
committerBill Marquette <billm@pfsense.org>2008-05-17 20:09:15 +0000
commita488f12d72bc5485e4b504b342422f1fff60dad8 (patch)
tree9004e674d34244434f051ec09b3b51220f90709f
parent04fc41b8239fd8a3a9edf9e40c477a581569202c (diff)
downloadpfsense-a488f12d72bc5485e4b504b342422f1fff60dad8.zip
pfsense-a488f12d72bc5485e4b504b342422f1fff60dad8.tar.gz
MFC of changeset [22589]
Ticket #1697 - rm authorized key file if keys don't exist in config.xml
-rwxr-xr-xetc/sshd4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/sshd b/etc/sshd
index eca1fb7..0bbe3d3 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -125,6 +125,10 @@
fwrite($fd, $authorizedkeys);
pclose($fd);
chmod("/root/.ssh/authorized_keys",0644);
+ } else {
+ if(file_exists("/root/.ssh/authorized_keys")) {
+ unlink("/root/.ssh/authorized_keys");
+ }
}
/* mop up from a badly implemented ssh keys -> cf backup */
OpenPOWER on IntegriCloud