summaryrefslogtreecommitdiffstats
path: root/etc/sshd
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2008-05-17 20:08:34 +0000
committerBill Marquette <billm@pfsense.org>2008-05-17 20:08:34 +0000
commit90ebd0b36a1a9804f4869f5508c4bbf88f653b33 (patch)
tree728f6466a0f6a28465f678ae90cca46f475e6042 /etc/sshd
parenta2086c54dfedf480300b6e797479c775bbeaae84 (diff)
downloadpfsense-90ebd0b36a1a9804f4869f5508c4bbf88f653b33.zip
pfsense-90ebd0b36a1a9804f4869f5508c4bbf88f653b33.tar.gz
Ticket #1697 - rm authorized key file if keys don't exist in config.xml
MFC: for 1.2.1
Diffstat (limited to 'etc/sshd')
-rwxr-xr-xetc/sshd6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/sshd b/etc/sshd
index 4bdba06..e2264cd 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -117,6 +117,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 */
@@ -274,4 +278,4 @@
system("/usr/sbin/sshd");
echo "done.\n";
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud