From 0a59b11baa07a3331df125638d09fc13d48a3f5c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 13 Mar 2005 01:02:12 +0000 Subject: Write out /root/.ssh/known_hosts and /root/.ssh/authorized_keys --- packages/carp_settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/carp_settings.xml b/packages/carp_settings.xml index befd3049..fce0262d 100644 --- a/packages/carp_settings.xml +++ b/packages/carp_settings.xml @@ -118,6 +118,17 @@ + system("/bin/mkdir -p /root/.ssh"); + if($_POST['knownhosts'] != "") { + $fout = fopen("/root/.ssh/known_hosts","w"); + fwrite($fout, $_POST['knownhosts']); + fclose($fout); + } + if($_POST['authorizedkeys'] != "") { + $fout = fopen("/root/.ssh/authorized_keys","w"); + fwrite($fout, $_POST['authorizedkeys']); + fclose($fout); + } -- cgit v1.2.3