diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-27 16:54:04 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-27 16:54:04 -0400 |
commit | 5c3ccc0dcf123ed41dcffc3df5405b2f0ba8d355 (patch) | |
tree | 374feab04c2d338e4d363fa52254d46a5c106f97 /etc/sshd | |
parent | 0fa9ebb1bfbcb1888df8784d04ccd1fbb1b8cfe4 (diff) | |
download | pfsense-5c3ccc0dcf123ed41dcffc3df5405b2f0ba8d355.zip pfsense-5c3ccc0dcf123ed41dcffc3df5405b2f0ba8d355.tar.gz |
Add ssh key support for nanobsd to preserve the ssh data
Diffstat (limited to 'etc/sshd')
-rwxr-xr-x | etc/sshd | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -46,6 +46,13 @@ return $size; } + /* restore ssh data for nanobsd platform */ + if($g['platform'] == "nanobsd" and file_exists("/config/ssh/ssh_host_key")) { + if(!file_exists("/etc/ssh/sshd_host_key.pub")) { + cp("/config/ssh/* /etc/ssh/"); + } + } + /* if any of these files are 0 bytes then they are corrupted. * remove them */ @@ -173,9 +180,11 @@ } // NanoBSD - if(file_exists("/root/save_sshkeys")) - exec("/root/save_sshkeys"); - + if($g['platform'] == "nanobsd") { + if(!is_dir("/config/sshd")) + exec("mkdir /config/sshd"); + exec("cp /etc/ssh/ssh_host* /config/sshd"); + } conf_mount_ro(); ?>
\ No newline at end of file |