summaryrefslogtreecommitdiffstats
path: root/etc/sshd
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-09 19:38:58 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-09 19:38:58 +0000
commit0a4869c539c76613912ffa7a21e069a06de4621e (patch)
treeb300d1b2500401f3a56fdc41a8ed530030e41707 /etc/sshd
parent3b18f1753b6805019a44f9c7df7d70e403565a40 (diff)
downloadpfsense-0a4869c539c76613912ffa7a21e069a06de4621e.zip
pfsense-0a4869c539c76613912ffa7a21e069a06de4621e.tar.gz
Sync /root/.authorized_keys on boot
Diffstat (limited to 'etc/sshd')
-rwxr-xr-xetc/sshd6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/sshd b/etc/sshd
index c991ca4..ccd0687 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -136,6 +136,12 @@
chmod("{$sshConfigDir}/ssh_host_dsa_key.pub",0600);
}
+ if($config['ssh']['ak'] <> "") {
+ $ak = base64_decode($config['ssh']['ak']);
+ file_put_contents("/root/.authorized_keys", $ak);
+ chmod("/root/.authorized_keys",0600);
+ }
+
/* start sshd */
system("/usr/sbin/sshd");
fwrite($stderr, "Done.\n");
OpenPOWER on IntegriCloud